// source --> https://www.algakon.es/wp-content/plugins/cookie-law-info/public/js/cookie-law-info-public.js?ver=2.0.1 CLI_ACCEPT_COOKIE_NAME =(typeof CLI_ACCEPT_COOKIE_NAME !== 'undefined' ? CLI_ACCEPT_COOKIE_NAME : 'viewed_cookie_policy'); CLI_PREFERNCE_COOKIE =(typeof CLI_PREFERNCE_COOKIE !== 'undefined' ? CLI_PREFERNCE_COOKIE : 'CookieLawInfoConsent'); CLI_ACCEPT_COOKIE_EXPIRE =(typeof CLI_ACCEPT_COOKIE_EXPIRE !== 'undefined' ? CLI_ACCEPT_COOKIE_EXPIRE : 365); CLI_COOKIEBAR_AS_POPUP=(typeof CLI_COOKIEBAR_AS_POPUP !== 'undefined' ? CLI_COOKIEBAR_AS_POPUP : false); var CLI_Cookie={ set: function (name, value, days) { var secure = ""; if ( true === Boolean( Cli_Data.secure_cookies ) ) secure = ";secure"; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); var expires = "; expires=" + date.toGMTString(); } else var expires = ""; document.cookie = name + "=" + value + secure + expires + "; path=/"; if(days<1) { host_name=window.location.hostname; document.cookie = name + "=" + value + expires + "; path=/; domain=."+host_name+";"; if(host_name.indexOf("www")!=1) { var host_name_withoutwww=host_name.replace('www',''); document.cookie = name + "=" + value + secure + expires + "; path=/; domain="+host_name_withoutwww+";"; } host_name=host_name.substring(host_name.lastIndexOf(".", host_name.lastIndexOf(".")-1)); document.cookie = name + "=" + value + secure + expires + "; path=/; domain="+host_name+";"; } }, read: function (name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1, c.length); } if (c.indexOf(nameEQ) === 0) { return c.substring(nameEQ.length, c.length); } } return null; }, erase: function (name) { this.set(name, "", -10); }, exists: function (name) { return (this.read(name) !== null); }, getallcookies:function() { var pairs = document.cookie.split(";"); var cookieslist = {}; for (var i = 0; i < pairs.length; i++) { var pair = pairs[i].split("="); cookieslist[(pair[0] + '').trim()] = unescape(pair[1]); } return cookieslist; } } var CLI= { bar_config:{}, showagain_config:{}, allowedCategories:[], js_blocking_enabled: false, set:function(args) { if(typeof JSON.parse !== "function") { console.log("CookieLawInfo requires JSON.parse but your browser doesn't support it"); return; } if(typeof args.settings!=='object') { this.settings = JSON.parse(args.settings); } else { this.settings = args.settings; } this.js_blocking_enabled = Boolean( Cli_Data.js_blocking ); this.settings = args.settings; this.bar_elm = jQuery(this.settings.notify_div_id); this.showagain_elm = jQuery(this.settings.showagain_div_id); this.settingsModal = jQuery('#cliSettingsPopup'); /* buttons */ this.main_button=jQuery('.cli-plugin-main-button'); this.main_link = jQuery('.cli-plugin-main-link'); this.reject_link = jQuery('.cookie_action_close_header_reject'); this.delete_link=jQuery(".cookielawinfo-cookie-delete"); this.settings_button=jQuery('.cli_settings_button'); this.accept_all_button = jQuery('.wt-cli-accept-all-btn'); if(this.settings.cookie_bar_as=='popup') { CLI_COOKIEBAR_AS_POPUP=true; } this.addStyleAttribute(); this.configBar(); this.toggleBar(); this.attachDelete(); this.attachEvents(); this.configButtons(); this.reviewConsent(); var cli_hidebar_on_readmore=this.hideBarInReadMoreLink(); if( Boolean( this.settings.scroll_close ) ===true && cli_hidebar_on_readmore===false) { window.addEventListener("scroll",CLI.closeOnScroll, false); } }, hideBarInReadMoreLink:function() { if( Boolean( CLI.settings.button_2_hidebar ) === true && this.main_link.length>0 && this.main_link.hasClass('cli-minimize-bar')) { this.hideHeader(); cliBlocker.cookieBar( false ); this.showagain_elm.slideDown(this.settings.animate_speed_show); return true; } return false; }, attachEvents:function() { jQuery(document).on('click','.wt-cli-privacy-btn',function(e){ e.preventDefault(); CLI.accept_close(); CLI.settingsPopUpClose(); }); jQuery('.cli_action_button').on("click", function(e) { e.preventDefault(); var elm=jQuery(this); var button_action=elm.attr('data-cli_action'); var open_link=elm[0].hasAttribute("href") && elm.attr("href") != '#' ? true : false; var new_window=false; if(button_action=='accept') { CLI.accept_close(); new_window= Boolean( CLI.settings.button_1_new_win ) ? true : false; } else if( button_action == 'accept_all') { CLI.enableAllCookies(); CLI.accept_close(); new_window=CLI.settings.button_7_new_win ? true : false; } else if(button_action=='reject') { CLI.reject_close(); new_window= Boolean( CLI.settings.button_3_new_win ) ? true : false; } if(open_link) { if(new_window) { window.open(elm.attr("href"),'_blank'); }else { window.location.href =elm.attr("href"); } } }); this.settingsPopUp(); this.settingsTabbedAccordion(); this.toggleUserPreferenceCheckBox(); this.hideCookieBarOnClose(); this.cookieLawInfoRunCallBacks(); }, toggleUserPreferenceCheckBox:function() { jQuery('.cli-user-preference-checkbox').each(function(){ categoryCookie = 'cookielawinfo-'+jQuery(this).attr('data-id'); categoryCookieValue = CLI_Cookie.read(categoryCookie); if( categoryCookieValue == null ) { if(jQuery(this).is(':checked')) { CLI_Cookie.set(categoryCookie,'yes',CLI_ACCEPT_COOKIE_EXPIRE); }else { CLI_Cookie.set(categoryCookie,'no',CLI_ACCEPT_COOKIE_EXPIRE); } } else { if(categoryCookieValue == "yes") { jQuery(this).prop("checked",true); } else { jQuery(this).prop("checked",false); } } }); jQuery('.cli-user-preference-checkbox').on("click", function(e) { var dataID = jQuery(this).attr('data-id'); var currentToggleElm = jQuery('.cli-user-preference-checkbox[data-id='+dataID+']'); if(jQuery(this).is(':checked')) { CLI_Cookie.set('cookielawinfo-'+dataID,'yes',CLI_ACCEPT_COOKIE_EXPIRE); currentToggleElm.prop('checked',true); }else { CLI_Cookie.set('cookielawinfo-'+dataID,'no',CLI_ACCEPT_COOKIE_EXPIRE); currentToggleElm.prop('checked',false); } CLI.checkCategories(); CLI.generateConsent(); }); }, settingsPopUp:function() { jQuery(document).on('click','.cli_settings_button',function(e){ e.preventDefault(); CLI.settingsModal.addClass("cli-show").css({'opacity':0}).animate({'opacity':1}); CLI.settingsModal.removeClass('cli-blowup cli-out').addClass("cli-blowup"); jQuery('body').addClass("cli-modal-open"); jQuery(".cli-settings-overlay").addClass("cli-show"); jQuery("#cookie-law-info-bar").css({'opacity':.1}); if(!jQuery('.cli-settings-mobile').is(':visible')) { CLI.settingsModal.find('.cli-nav-link:eq(0)').trigger("click"); } }); jQuery('#cliModalClose').on("click", function(e) { CLI.settingsPopUpClose(); }); CLI.settingsModal.on("click", function(e) { if(!(document.getElementsByClassName('cli-modal-dialog')[0].contains(e.target))) { CLI.settingsPopUpClose(); } }); jQuery('.cli_enable_all_btn').on("click", function(e) { var cli_toggle_btn = jQuery(this); var enable_text = cli_toggle_btn.attr('data-enable-text'); var disable_text= cli_toggle_btn.attr('data-disable-text'); if(cli_toggle_btn.hasClass('cli-enabled')){ CLI.disableAllCookies(); cli_toggle_btn.html(enable_text); } else { CLI.enableAllCookies(); cli_toggle_btn.html(disable_text); } jQuery(this).toggleClass('cli-enabled'); }); this.privacyReadmore(); }, settingsTabbedAccordion:function() { jQuery(".cli-tab-header").on("click", function(e) { if(!(jQuery(e.target).hasClass('cli-slider') || jQuery(e.target).hasClass('cli-user-preference-checkbox'))) { if (jQuery(this).hasClass("cli-tab-active")) { jQuery(this).removeClass("cli-tab-active"); jQuery(this) .siblings(".cli-tab-content") .slideUp(200); } else { jQuery(".cli-tab-header").removeClass("cli-tab-active"); jQuery(this).addClass("cli-tab-active"); jQuery(".cli-tab-content").slideUp(200); jQuery(this) .siblings(".cli-tab-content") .slideDown(200); } } }); }, settingsPopUpClose:function() { this.settingsModal.removeClass('cli-show'); this.settingsModal.addClass('cli-out'); jQuery('body').removeClass("cli-modal-open"); jQuery(".cli-settings-overlay").removeClass("cli-show"); jQuery("#cookie-law-info-bar").css({'opacity':1}); }, privacyReadmore:function() { var el= jQuery('.cli-privacy-content .cli-privacy-content-text'); if( el.length > 0 ) { var clone= el.clone(), originalHtml= clone.html(), originalHeight= el.outerHeight(), Trunc = { addReadmore:function(textBlock) { if(textBlock.html().length > 250) { jQuery('.cli-privacy-readmore').show(); } else { jQuery('.cli-privacy-readmore').hide(); } }, truncateText : function( textBlock ) { var strippedText = jQuery('
').html(textBlock.html()); strippedText.find('table').remove(); textBlock.html(strippedText.html()); currentText = textBlock.text(); if(currentText.trim().length > 250){ var newStr = currentText.substring(0, 250); textBlock.empty().html(newStr).append('...'); } }, replaceText: function ( textBlock, original ){ return textBlock.html(original); } }; Trunc.addReadmore(el); Trunc.truncateText(el); jQuery('a.cli-privacy-readmore').on("click", function(e) { e.preventDefault(); if(jQuery('.cli-privacy-overview').hasClass('cli-collapsed')) { Trunc.truncateText(el); jQuery('.cli-privacy-overview').removeClass('cli-collapsed'); el.css('height', '100%'); } else { jQuery('.cli-privacy-overview').addClass('cli-collapsed'); Trunc.replaceText(el, originalHtml); } }); } }, attachDelete:function() { this.delete_link.on("click", function(e) { CLI_Cookie.erase(CLI_ACCEPT_COOKIE_NAME); for(var k in Cli_Data.nn_cookie_ids) { CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]); } CLI.generateConsent(); return false; }); }, configButtons:function() { /*[cookie_button] */ this.main_button.css('color',this.settings.button_1_link_colour); if( Boolean( this.settings.button_1_as_button ) ) { this.main_button.css('background-color',this.settings.button_1_button_colour); this.main_button.on('mouseenter', function(){ jQuery(this).css('background-color',CLI.settings.button_1_button_hover); }) .on('mouseleave', function(){ jQuery(this).css('background-color',CLI.settings.button_1_button_colour); }); } /* [cookie_link] */ this.main_link.css('color',this.settings.button_2_link_colour); if( Boolean( this.settings.button_2_as_button ) ) { this.main_link.css('background-color',this.settings.button_2_button_colour); this.main_link.on('mouseenter', function(){ jQuery(this).css('background-color',CLI.settings.button_2_button_hover); }) .on('mouseleave', function(){ jQuery(this).css('background-color',CLI.settings.button_2_button_colour); }); } /* [cookie_reject] */ this.reject_link.css('color',this.settings.button_3_link_colour); if( Boolean( this.settings.button_3_as_button ) ) { this.reject_link.css('background-color',this.settings.button_3_button_colour); this.reject_link.on('mouseenter', function(){ jQuery(this).css('background-color',CLI.settings.button_3_button_hover); }) .on('mouseleave', function(){ jQuery(this).css('background-color',CLI.settings.button_3_button_colour); }); } /* [cookie_settings] */ this.settings_button.css('color',this.settings.button_4_link_colour); if( Boolean( this.settings.button_4_as_button ) ) { this.settings_button.css('background-color',this.settings.button_4_button_colour); this.settings_button.on('mouseenter', function(){ jQuery(this).css('background-color',CLI.settings.button_4_button_hover); }) .on('mouseleave', function(){ jQuery(this).css('background-color',CLI.settings.button_4_button_colour); }); } /* [cookie_accept_all] */ this.accept_all_button.css('color',this.settings.button_7_link_colour); if(this.settings.button_7_as_button) { this.accept_all_button.css('background-color',this.settings.button_7_button_colour); this.accept_all_button.on('mouseenter', function(){ jQuery(this).css('background-color',CLI.settings.button_7_button_hover); }) .on('mouseleave', function(){ jQuery(this).css('background-color',CLI.settings.button_7_button_colour); }); } }, toggleBar:function() { if(CLI_COOKIEBAR_AS_POPUP) { this.barAsPopUp(1); } if(CLI.settings.cookie_bar_as=='widget') { this.barAsWidget(1); } if(!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) { this.displayHeader(); }else { this.hideHeader(); } if( Boolean( this.settings.show_once_yn )) { setTimeout(function(){ CLI.close_header(); },CLI.settings.show_once); } if( CLI.js_blocking_enabled === false ) { if( Boolean( Cli_Data.ccpaEnabled ) === true ) { if( Cli_Data.ccpaType === 'ccpa' && Boolean( Cli_Data.ccpaBarEnabled ) === false ) { cliBlocker.cookieBar( false ); } } else { jQuery('.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element').remove(); } } this.showagain_elm.on("click", function(e) { e.preventDefault(); CLI.showagain_elm.slideUp(CLI.settings.animate_speed_hide,function() { CLI.bar_elm.slideDown(CLI.settings.animate_speed_show); if(CLI_COOKIEBAR_AS_POPUP) { CLI.showPopupOverlay(); } }); }); }, configShowAgain:function() { this.showagain_config = { 'background-color': this.settings.background, 'color':this.l1hs(this.settings.text), 'position': 'fixed', 'font-family': this.settings.font_family }; if(Boolean( this.settings.border_on ) ) { var border_to_hide = 'border-' + this.settings.notify_position_vertical; this.showagain_config['border'] = '1px solid ' + this.l1hs(this.settings.border); this.showagain_config[border_to_hide] = 'none'; } var cli_win=jQuery(window); var cli_winw=cli_win.width(); var showagain_x_pos=this.settings.showagain_x_position; if(cli_winw<300) { showagain_x_pos=10; this.showagain_config.width=cli_winw-20; }else { this.showagain_config.width='auto'; } var cli_defw=cli_winw>400 ? 500 : cli_winw-20; if(CLI_COOKIEBAR_AS_POPUP) /* cookie bar as popup */ { var sa_pos=this.settings.popup_showagain_position; var sa_pos_arr=sa_pos.split('-'); if(sa_pos_arr[1]=='left') { this.showagain_config.left=showagain_x_pos; }else if(sa_pos_arr[1]=='right') { this.showagain_config.right=showagain_x_pos; } if(sa_pos_arr[0]=='top') { this.showagain_config.top=0; }else if(sa_pos_arr[0]=='bottom') { this.showagain_config.bottom=0; } this.bar_config['position'] = 'fixed'; }else if(this.settings.cookie_bar_as=='widget') { this.showagain_config.bottom=0; if(this.settings.widget_position=='left') { this.showagain_config.left=showagain_x_pos; }else if(this.settings.widget_position=='right') { this.showagain_config.right=showagain_x_pos; } } else { if(this.settings.notify_position_vertical == "top") { this.showagain_config.top = '0'; } else if(this.settings.notify_position_vertical == "bottom") { this.bar_config['position'] = 'fixed'; this.bar_config['bottom'] = '0'; this.showagain_config.bottom = '0'; } if(this.settings.notify_position_horizontal == "left") { this.showagain_config.left =showagain_x_pos; }else if(this.settings.notify_position_horizontal == "right") { this.showagain_config.right =showagain_x_pos; } } this.showagain_elm.css(this.showagain_config); }, configBar:function() { this.bar_config = { 'background-color':this.settings.background, 'color':this.settings.text, 'font-family':this.settings.font_family }; if(this.settings.notify_position_vertical=="top") { this.bar_config['top'] = '0'; if( Boolean( this.settings.header_fix ) === true) { this.bar_config['position'] = 'fixed'; } }else { this.bar_config['bottom'] = '0'; } this.configShowAgain(); this.bar_elm.css(this.bar_config).hide(); }, l1hs:function(str) { if (str.charAt(0) == "#") { str = str.substring(1, str.length); } else { return "#" + str; } return this.l1hs(str); }, close_header:function() { CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME,'yes',CLI_ACCEPT_COOKIE_EXPIRE); this.hideHeader(); }, accept_close:function() { this.hidePopupOverlay(); this.generateConsent(); this.cookieLawInfoRunCallBacks(); CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME,'yes',CLI_ACCEPT_COOKIE_EXPIRE); if( Boolean( this.settings.notify_animate_hide ) ) { if( CLI.js_blocking_enabled === true ) { this.bar_elm.slideUp( this.settings.animate_speed_hide, cliBlocker.runScripts ); } else { this.bar_elm.slideUp( this.settings.animate_speed_hide ); } }else { if( CLI.js_blocking_enabled === true ) { this.bar_elm.hide( cliBlocker.runScripts ); } else { this.bar_elm.hide(); } } if( Boolean( this.settings.showagain_tab ) ) { this.showagain_elm.slideDown(this.settings.animate_speed_show); } if( Boolean( this.settings.accept_close_reload ) === true ) { this.reload_current_page(); } return false; }, reject_close:function() { this.hidePopupOverlay(); this.generateConsent(); this.cookieLawInfoRunCallBacks(); for(var k in Cli_Data.nn_cookie_ids) { CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]); } CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME,'no',CLI_ACCEPT_COOKIE_EXPIRE); if( Boolean( this.settings.notify_animate_hide ) ) { if( CLI.js_blocking_enabled === true ) { this.bar_elm.slideUp(this.settings.animate_speed_hide, cliBlocker.runScripts); } else { this.bar_elm.slideUp(this.settings.animate_speed_hide); } } else { if( CLI.js_blocking_enabled === true ) { this.bar_elm.hide( cliBlocker.runScripts ); } else { this.bar_elm.hide(); } } if( Boolean( this.settings.showagain_tab ) ) { this.showagain_elm.slideDown(this.settings.animate_speed_show); } if( Boolean( this.settings.reject_close_reload ) === true ) { this.reload_current_page(); } return false; }, reload_current_page:function() { if(typeof cli_flush_cache!=='undefined' && cli_flush_cache === true) { window.location.href=this.add_clear_cache_url_query(); }else { window.location.reload(true); } }, add_clear_cache_url_query:function() { var cli_rand=new Date().getTime()/1000; var cli_url=window.location.href; var cli_hash_arr=cli_url.split('#'); var cli_urlparts= cli_hash_arr[0].split('?'); if(cli_urlparts.length>=2) { var cli_url_arr=cli_urlparts[1].split('&'); cli_url_temp_arr=new Array(); for(var cli_i=0; cli_i0 ? '&': '')+'cli_action='; }else { cli_url=cli_hash_arr[0]+'?cli_action='; } cli_url+=cli_rand; if(cli_hash_arr.length>1) { cli_url+='#'+cli_hash_arr[1]; } return cli_url; }, closeOnScroll:function() { if(window.pageYOffset > 100 && !CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)) { CLI.accept_close(); if( Boolean( CLI.settings.scroll_close_reload ) === true) { window.location.reload(); } window.removeEventListener("scroll",CLI.closeOnScroll,false); } }, displayHeader:function() { if( Boolean( this.settings.notify_animate_show ) ) { this.bar_elm.slideDown(this.settings.animate_speed_show); }else { this.bar_elm.show(); } this.showagain_elm.hide(); if(CLI_COOKIEBAR_AS_POPUP) { this.showPopupOverlay(); } }, hideHeader:function() { if( Boolean( this.settings.showagain_tab ) ) { if( Boolean( this.settings.notify_animate_show ) ) { this.showagain_elm.slideDown(this.settings.animate_speed_show); } else { this.showagain_elm.show(); } }else { this.showagain_elm.hide(); } this.bar_elm.slideUp(this.settings.animate_speed_show); this.hidePopupOverlay(); }, hidePopupOverlay:function() { jQuery('body').removeClass("cli-barmodal-open"); jQuery(".cli-popupbar-overlay").removeClass("cli-show"); }, showPopupOverlay:function() { if( this.bar_elm.length ) { if( Boolean( this.settings.popup_overlay ) ) { jQuery('body').addClass("cli-barmodal-open"); jQuery(".cli-popupbar-overlay").addClass("cli-show"); } } }, barAsWidget:function(a) { var cli_elm=this.bar_elm; cli_elm.attr('data-cli-type','widget'); var cli_win=jQuery(window); var cli_winh=cli_win.height()-40; var cli_winw=cli_win.width(); var cli_defw=cli_winw>400 ? 300 : cli_winw-30; cli_elm.css({ 'width':cli_defw,'height':'auto','max-height':cli_winh,'overflow':'auto','position':'fixed','box-sizing':'border-box' }); if ( this.checkifStyleAttributeExist() === false ) { cli_elm.css({'padding':'25px 15px'}); } if(this.settings.widget_position=='left') { cli_elm.css({ 'left':'15px','right':'auto','bottom':'15px','top':'auto' }); }else { cli_elm.css({ 'left':'auto','right':'15px','bottom':'15px','top':'auto' }); } if(a) { this.setResize(); } }, barAsPopUp:function(a) { if(typeof cookie_law_info_bar_as_popup==='function') { return false; } var cli_elm=this.bar_elm; cli_elm.attr('data-cli-type','popup'); var cli_win=jQuery(window); var cli_winh=cli_win.height()-40; var cli_winw=cli_win.width(); var cli_defw=cli_winw>700 ? 500 : cli_winw-20; cli_elm.css({ 'width':cli_defw,'height':'auto','max-height':cli_winh,'bottom':'','top':'50%','left':'50%','margin-left':(cli_defw/2)*-1,'margin-top':'-100px','overflow':'auto' }).addClass('cli-bar-popup cli-modal-content'); if ( this.checkifStyleAttributeExist() === false ) { cli_elm.css({'padding':'25px 15px'}); } cli_h=cli_elm.height(); li_h=cli_h<200 ? 200 : cli_h; cli_elm.css({'top':'50%','margin-top':((cli_h/2)+30)*-1}); setTimeout(function(){ cli_elm.css({ 'bottom':'' }); },100); if(a) { this.setResize(); } }, setResize:function() { var resizeTmr=null; jQuery(window).resize(function() { clearTimeout(resizeTmr); resizeTmr=setTimeout(function() { if(CLI_COOKIEBAR_AS_POPUP) { CLI.barAsPopUp(); } if(CLI.settings.cookie_bar_as=='widget') { CLI.barAsWidget(); } CLI.configShowAgain(); },500); }); }, enableAllCookies:function() { jQuery('.cli-user-preference-checkbox').each(function(){ var cli_chkbox_elm=jQuery(this); var cli_chkbox_data_id=cli_chkbox_elm.attr('data-id'); if(cli_chkbox_data_id!='checkbox-necessary') { cli_chkbox_elm.prop('checked',true); CLI_Cookie.set('cookielawinfo-'+cli_chkbox_data_id,'yes',CLI_ACCEPT_COOKIE_EXPIRE); } }); }, hideCookieBarOnClose: function() { jQuery(document).on('click','.cli_cookie_close_button',function(e){ e.preventDefault(); var elm=jQuery(this); var button_action = elm.attr('data-cli_action'); if( Cli_Data.ccpaType === 'ccpa' ) { CLI.enableAllCookies(); } CLI.accept_close(); }); }, checkCategories:function() { var cliAllowedCategories = []; var cli_categories = {}; jQuery('.cli-user-preference-checkbox').each(function() { var status=false; cli_chkbox_elm=jQuery(this); cli_chkbox_data_id=cli_chkbox_elm.attr('data-id'); cli_chkbox_data_id=cli_chkbox_data_id.replace('checkbox-',''); cli_chkbox_data_id_trimmed=cli_chkbox_data_id.replace('-','_') if(jQuery(cli_chkbox_elm).is(':checked')) { status=true; cliAllowedCategories.push(cli_chkbox_data_id); } cli_categories[cli_chkbox_data_id_trimmed]= status; }); CLI.allowedCategories = cliAllowedCategories; }, cookieLawInfoRunCallBacks:function() { this.checkCategories(); if(CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)=='yes') { if("function" == typeof CookieLawInfo_Accept_Callback){ CookieLawInfo_Accept_Callback(); } } }, generateConsent:function() { var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE); cliConsent = {}; if(preferenceCookie !== null) { cliConsent = window.atob(preferenceCookie); cliConsent = JSON.parse(cliConsent); } cliConsent.ver = Cli_Data.consentVersion; categories = []; jQuery('.cli-user-preference-checkbox').each(function(){ categoryVal = ''; cli_chkbox_data_id = jQuery(this).attr('data-id'); cli_chkbox_data_id = cli_chkbox_data_id.replace('checkbox-',''); if(jQuery(this).is(':checked')) { categoryVal = true; } else { categoryVal = false; } cliConsent[cli_chkbox_data_id] = categoryVal; }); cliConsent = JSON.stringify(cliConsent); cliConsent = window.btoa(cliConsent); CLI_Cookie.set(CLI_PREFERNCE_COOKIE,cliConsent,CLI_ACCEPT_COOKIE_EXPIRE); }, addStyleAttribute:function() { var bar=this.bar_elm; var styleClass=''; if(jQuery(bar).find('.cli-bar-container').length > 0) { styleClass = jQuery('.cli-bar-container').attr('class'); styleClass = styleClass.replace('cli-bar-container',''); styleClass = styleClass.trim(); jQuery(bar).attr('data-cli-style',styleClass); } }, getParameterByName: function( name, url ) { if (!url) url = window.location.href; name = name.replace(/[\[\]]/g, '\\$&'); var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url); if (!results) return null; if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, ' ')); }, CookieLawInfo_Callback: function( enableBar, enableBlocking ) { enableBar = typeof enableBar !== 'undefined' ? enableBar : true; enableBlocking = typeof enableBlocking !== 'undefined' ? enableBlocking : true; if( CLI.js_blocking_enabled === true && Boolean( Cli_Data.custom_integration ) === true ) { cliBlocker.cookieBar( enableBar ); cliBlocker.runScripts( enableBlocking ); } }, checkifStyleAttributeExist: function() { var exist = false; var attr = this.bar_elm.attr('data-cli-style'); if (typeof attr !== typeof undefined && attr !== false) { exist = true; } return exist; }, reviewConsent : function() { jQuery(document).on('click','.cli_manage_current_consent,.wt-cli-manage-consent-link',function(){ CLI.displayHeader(); }); } } var cliBlocker = { blockingStatus: true, scriptsLoaded: false, ccpaEnabled : false, ccpaRegionBased : false, ccpaApplicable : false, ccpaBarEnabled: false, cliShowBar: true , isBypassEnabled: CLI.getParameterByName('cli_bypass'), checkPluginStatus: function(callbackA , callbackB ) { this.ccpaEnabled = Boolean( Cli_Data.ccpaEnabled ); this.ccpaRegionBased = Boolean( Cli_Data.ccpaRegionBased ); this.ccpaBarEnabled = Boolean( Cli_Data.ccpaBarEnabled ); if( Boolean( Cli_Data.custom_integration ) === true ) { callbackA( false ); } else { if( this.ccpaEnabled === true ) { this.ccpaApplicable = true; if( Cli_Data.ccpaType === 'ccpa') { if( this.ccpaBarEnabled !== true ) { this.cliShowBar = false; this.blockingStatus = false; } } } else { jQuery('.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element').remove(); } if ( cliBlocker.isBypassEnabled === "1") { cliBlocker.blockingStatus = false; } callbackA( this.cliShowBar ); callbackB( this.blockingStatus); } }, cookieBar: function( showbar ) { showbar = typeof showbar !== 'undefined' ? showbar : true; cliBlocker.cliShowBar = showbar; if(cliBlocker.cliShowBar === false) { CLI.bar_elm.hide(); CLI.showagain_elm.hide(); CLI.settingsModal.removeClass('cli-blowup cli-out'); CLI.hidePopupOverlay(); jQuery(".cli-settings-overlay").removeClass("cli-show"); } else { if(!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) { CLI.displayHeader(); } else { CLI.hideHeader(); } CLI.settingsModal.show(); jQuery('.cli-modal-backdrop').show(); } }, removeCookieByCategory : function() { if(cliBlocker.blockingStatus === true) { if(CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) !== null) { var non_necessary_cookies = Cli_Data.non_necessary_cookies; for (var key in non_necessary_cookies) { currentCategory = key; if(CLI.allowedCategories.indexOf(currentCategory) === -1) { var nonNecessaryCookies = non_necessary_cookies[currentCategory]; for(var i=0; i < nonNecessaryCookies.length; i++) { if(CLI_Cookie.read(nonNecessaryCookies[i]) !== null) { CLI_Cookie.erase(nonNecessaryCookies[i]); } } } } } } }, runScripts:function( blocking ) { blocking = typeof blocking !== 'undefined' ? blocking : true; cliBlocker.blockingStatus = blocking; srcReplaceableElms = ['iframe','IFRAME','EMBED','embed','OBJECT','object','IMG','img']; var genericFuncs = { renderByElement: function( callback ) { cliScriptFuncs.renderScripts(); callback(); cliBlocker.scriptsLoaded = true; }, }; var cliScriptFuncs = { // trigger DOMContentLoaded scriptsDone:function() { if (typeof Cli_Data.triggerDomRefresh !== 'undefined') { if( Boolean( Cli_Data.triggerDomRefresh ) === true ) { var DOMContentLoadedEvent = document.createEvent('Event') DOMContentLoadedEvent.initEvent('DOMContentLoaded', true, true) window.document.dispatchEvent(DOMContentLoadedEvent); } } }, seq :function(arr, callback, index) { // first call, without an index if (typeof index === 'undefined') { index = 0 } arr[index](function () { index++ if (index === arr.length) { callback() } else { cliScriptFuncs.seq(arr, callback, index) } }) }, /* script runner */ insertScript:function($script,callback) { var s =''; var scriptType = $script.getAttribute('data-cli-script-type'); var elementPosition = $script.getAttribute('data-cli-element-position'); var isBlock = $script.getAttribute('data-cli-block'); var s = document.createElement('script'); var ccpaOptedOut = cliBlocker.ccpaOptedOut(); s.type = 'text/plain'; if($script.async) { s.async = $script.async; } if($script.defer) { s.defer = $script.defer; } if ($script.src) { s.onload = callback s.onerror = callback s.src = $script.src } else { s.textContent = $script.innerText } var attrs = jQuery($script).prop("attributes"); for (var ii = 0; ii < attrs.length; ++ii) { if (attrs[ii].nodeName !== 'id') { s.setAttribute(attrs[ii].nodeName,attrs[ii].value); } } if(cliBlocker.blockingStatus === true) { if(( CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)=='yes' && CLI.allowedCategories.indexOf(scriptType) !== -1 ) ) { s.setAttribute('data-cli-consent','accepted'); s.type = 'text/javascript'; } if( cliBlocker.ccpaApplicable === true ) { if( ccpaOptedOut === true || CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == null ) { s.type = 'text/plain'; } } } else { s.type = 'text/javascript'; } if($script.type != s.type) { if(elementPosition === 'head') { document.head.appendChild(s); } else { document.body.appendChild(s); } if (!$script.src) { callback() } $script.parentNode.removeChild($script); } else { callback(); } }, renderScripts:function() { var $scripts = document.querySelectorAll('script[data-cli-class="cli-blocker-script"]'); if($scripts.length > 0) { var runList = [] var typeAttr Array.prototype.forEach.call($scripts, function ($script) { // only run script tags without the type attribute // or with a javascript mime attribute value typeAttr = $script.getAttribute('type') runList.push(function (callback) { cliScriptFuncs.insertScript($script, callback) }) }) cliScriptFuncs.seq(runList, cliScriptFuncs.scriptsDone); } } }; genericFuncs.renderByElement( cliBlocker.removeCookieByCategory ); }, ccpaOptedOut : function () { var ccpaOptedOut = false; var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE); if( preferenceCookie !== null ) { cliConsent = window.atob(preferenceCookie); cliConsent = JSON.parse(cliConsent); if( typeof cliConsent.ccpaOptout !== 'undefined') { ccpaOptedOut = cliConsent.ccpaOptout; } } return ccpaOptedOut; } } jQuery(document).ready(function() { if(typeof cli_cookiebar_settings!='undefined') { CLI.set({ settings:cli_cookiebar_settings }); if( CLI.js_blocking_enabled === true ) { cliBlocker.checkPluginStatus(cliBlocker.cookieBar,cliBlocker.runScripts); } } }); // source --> https://www.algakon.es/wp-content/plugins/wonderplugin/engine/wonderplugingallery.js?ver=4.9 /** Wonderplugin Gallery Plugin Free Version * Copyright 2015 Magic Hills Pty Ltd All Rights Reserved * Website: http://www.wonderplugin.com * Version 4.9 */ (function(){var scripts=document.getElementsByTagName("script");var jsFolder="";for(var i=0;i=1){startX=e.targetTouches[0].pageX;startY=e.targetTouches[0].pageY}else touchCancel(event)}function touchMove(event){if(defaults.preventWebBrowser)event.preventDefault(); var e=event.originalEvent;if(e.targetTouches.length>=1){curX=e.targetTouches[0].pageX;curY=e.targetTouches[0].pageY}else touchCancel(event)}function touchEnd(event){if(curX>0||curY>0){triggerHandler();touchCancel(event)}else touchCancel(event)}function touchCancel(event){startX=-1;startY=-1;curX=-1;curY=-1}function triggerHandler(){if(Math.abs(curX-startX)>100)if(curX>startX){if(defaults.swipeRight)defaults.swipeRight.call()}else if(defaults.swipeLeft)defaults.swipeLeft.call();if(Math.abs(curY-startY)> 100)if(curY>startY){if(defaults.swipeBottom)defaults.swipeBottom.call()}else if(defaults.swipeTop)defaults.swipeTop.call()}try{$(this).bind("touchstart",touchStart);$(this).bind("touchmove",touchMove);$(this).bind("touchend",touchEnd);$(this).bind("touchcancel",touchCancel)}catch(e){}})}})(jQuery);(function($){$.fn.drag=function(str,arg,opts){var type=typeof str=="string"?str:"",fn=$.isFunction(str)?str:$.isFunction(arg)?arg:null;if(type.indexOf("drag")!==0)type="drag"+type;opts=(str==fn?arg:opts)|| {};return fn?this.bind(type,opts,fn):this.trigger(type)};var $event=$.event;var $special=$event.special;var drag=null;drag=$special.drag={defaults:{which:1,distance:0,not:":input",handle:null,relative:false,drop:true,click:false},datakey:"dragdata",livekey:"livedrag",add:function(obj){var data=$.data(this,drag.datakey),opts=obj.data||{};data.related+=1;if(!data.live&&obj.selector){data.live=true;$event.add(this,"draginit."+drag.livekey,drag.delegate)}$.each(drag.defaults,function(key,def){if(opts[key]!== undefined)data[key]=opts[key]})},remove:function(){$.data(this,drag.datakey).related-=1},setup:function(){if($.data(this,drag.datakey))return;var data=$.extend({related:0},drag.defaults);$.data(this,drag.datakey,data);$event.add(this,"mousedown",drag.init,data);if(this.attachEvent)this.attachEvent("ondragstart",drag.dontstart)},teardown:function(){if($.data(this,drag.datakey).related)return;$.removeData(this,drag.datakey);$event.remove(this,"mousedown",drag.init);$event.remove(this,"draginit",drag.delegate); drag.textselect(true);if(this.detachEvent)this.detachEvent("ondragstart",drag.dontstart)},init:function(event){var dd=event.data,results;if(dd.which>0&&event.which!=dd.which)return;if($(event.target).is(dd.not))return;if(dd.handle&&!$(event.target).closest(dd.handle,event.currentTarget).length)return;dd.propagates=1;dd.interactions=[drag.interaction(this,dd)];dd.target=event.target;dd.pageX=event.pageX;dd.pageY=event.pageY;dd.dragging=null;results=drag.hijack(event,"draginit",dd);if(!dd.propagates)return; results=drag.flatten(results);if(results&&results.length){dd.interactions=[];$.each(results,function(){dd.interactions.push(drag.interaction(this,dd))})}dd.propagates=dd.interactions.length;if(dd.drop!==false&&$special.drop)$special.drop.handler(event,dd);drag.textselect(false);$event.add(document,"mousemove mouseup",drag.handler,dd);return false},interaction:function(elem,dd){return{drag:elem,callback:new drag.callback,droppable:[],offset:$(elem)[dd.relative?"position":"offset"]()||{top:0,left:0}}}, handler:function(event){var dd=event.data;switch(event.type){case !dd.dragging&&"mousemove":if(Math.pow(event.pageX-dd.pageX,2)+Math.pow(event.pageY-dd.pageY,2)
");if(!isIPhone){$videoObj.after($videoPlay);$videoPlay.css({position:"absolute",top:"50%",left:"50%",display:"block",cursor:"pointer",width:64,height:64,"margin-left":-32,"margin-top":-32,"background-image":"url('"+ skinFolder+"html5boxplayer_playvideo.png"+"')","background-position":"center center","background-repeat":"no-repeat"}).bind(eClick,function(){$videoObj.get(0).play()})}var $videoFullscreenBg=$("
");var $videoControls=$("
"+"
"+"
"+"
"+"
"+"
"+"
--:--
"+ "
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
--:--
"+"
"+"
"+"
"+"
"+"
"+ "
"+"
");$videoObj.after($videoControls);$videoObj.after($videoFullscreenBg);$videoFullscreenBg.css({display:"none",position:"fixed",left:0,top:0,bottom:0,right:0,"z-index":2147483647});$videoControls.css({display:"block",position:"absolute",width:"100%",height:BAR_HEIGHT,left:0,bottom:0});var userActivate=function(){userActive=true};$videoObj.bind(eClick,function(){userActive=true}).hover(function(){userActive=true},function(){userActive=false});setInterval(function(){if(userActive){$videoControls.show(); userActive=false;clearTimeout(hideControlsTimerId);hideControlsTimerId=setTimeout(function(){if(!$videoObj.get(0).paused)$videoControls.fadeOut()},5E3)}},250);$(".html5boxVideoControlsBg",$videoControls).css({display:"block",position:"absolute",width:"100%",height:"100%",left:0,top:0,"background-color":"#000000",opacity:0.7,filter:"alpha(opacity=70)"});$(".html5boxPlayPause",$videoControls).css({display:"block",position:"relative",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT- BUTTON_SIZE)/2),"float":"left"});var $videoBtnPlay=$(".html5boxPlay",$videoControls);var $videoBtnPause=$(".html5boxPause",$videoControls);$videoBtnPlay.css({display:"block",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_playpause.png"+"')","background-position":"top left"}).hover(function(){$(this).css({"background-position":"bottom left"})},function(){$(this).css({"background-position":"top left"})}).bind(eClick, function(){$videoObj.get(0).play()});$videoBtnPause.css({display:"none",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_playpause.png"+"')","background-position":"top right"}).hover(function(){$(this).css({"background-position":"bottom right"})},function(){$(this).css({"background-position":"top right"})}).bind(eClick,function(){$videoObj.get(0).pause()});var $videoTimeCurrent=$(".html5boxTimeCurrent", $videoControls);var $videoTimeTotal=$(".html5boxTimeTotal",$videoControls);var $videoSeeker=$(".html5boxSeeker",$videoControls);var $videoSeekerPlay=$(".html5boxSeekerPlay",$videoControls);var $videoSeekerBuffer=$(".html5boxSeekerBuffer",$videoControls);var $videoSeekerHandler=$(".html5boxSeekerHandler",$videoControls);$videoTimeCurrent.css({display:"block",position:"relative","float":"left","line-height":BAR_HEIGHT+"px","font-weight":"normal","font-size":"12px",margin:"0 8px","font-family":"Arial, Helvetica, sans-serif", color:"#fff"});$videoTimeTotal.css({display:"block",position:"relative","float":"right","line-height":BAR_HEIGHT+"px","font-weight":"normal","font-size":"12px",margin:"0 8px","font-family":"Arial, Helvetica, sans-serif",color:"#fff"});$videoSeeker.css({display:"block",cursor:"pointer",overflow:"hidden",position:"relative",height:"10px","background-color":"#222",margin:Math.floor((BAR_HEIGHT-10)/2)+"px 4px"}).bind(eStart,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var pos=e0.pageX-$videoSeeker.offset().left; $videoSeekerPlay.css({width:pos});$videoObj.get(0).currentTime=pos*$videoObj.get(0).duration/$videoSeeker.width();$videoSeeker.bind(eMove,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var pos=e0.pageX-$videoSeeker.offset().left;$videoSeekerPlay.css({width:pos});$videoObj.get(0).currentTime=pos*$videoObj.get(0).duration/$videoSeeker.width()})}).bind(eCancel,function(){$videoSeeker.unbind(eMove)});$videoSeekerBuffer.css({display:"block",position:"absolute",left:0,top:0,height:"100%","background-color":"#444"}); $videoSeekerPlay.css({display:"block",position:"absolute",left:0,top:0,height:"100%","background-color":"#fcc500"});if(!isIPhone&&($videoObj.get(0).requestFullscreen||$videoObj.get(0).webkitRequestFullScreen||$videoObj.get(0).mozRequestFullScreen||$videoObj.get(0).webkitEnterFullScreen||$videoObj.get(0).msRequestFullscreen)){var switchScreen=function(fullscreen){if(fullscreen){if($videoObj.get(0).requestFullscreen)$videoObj.get(0).requestFullscreen();else if($videoObj.get(0).webkitRequestFullScreen)$videoObj.get(0).webkitRequestFullScreen(); else if($videoObj.get(0).mozRequestFullScreen)$videoObj.get(0).mozRequestFullScreen();else if($videoObj.get(0).webkitEnterFullScreen)$videoObj.get(0).webkitEnterFullScreen();if($videoObj.get(0).msRequestFullscreen)$videoObj.get(0).msRequestFullscreen()}else if(document.cancelFullScreen)document.cancelFullScreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else if(document.webkitCancelFullScreen)document.webkitCancelFullScreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen(); else if(document.msExitFullscreen)document.msExitFullscreen()};var switchScreenCSS=function(fullscreen){$videoControls.css({position:fullscreen?"fixed":"absolute"});var backgroundPosY=$videoFullscreen.css("background-position")?$videoFullscreen.css("background-position").split(" ")[1]:$videoFullscreen.css("background-position-y");$videoFullscreen.css({"background-position":(fullscreen?"right":"left")+" "+backgroundPosY});$videoFullscreenBg.css({display:fullscreen?"block":"none"});if(fullscreen){$(document).bind("mousemove", userActivate);$videoControls.css({"z-index":2147483647})}else{$(document).unbind("mousemove",userActivate);$videoControls.css({"z-index":""})}};document.addEventListener("fullscreenchange",function(){isFullscreen=document.fullscreen;switchScreenCSS(document.fullscreen)},false);document.addEventListener("mozfullscreenchange",function(){isFullscreen=document.mozFullScreen;switchScreenCSS(document.mozFullScreen)},false);document.addEventListener("webkitfullscreenchange",function(){isFullscreen=document.webkitIsFullScreen; switchScreenCSS(document.webkitIsFullScreen)},false);$videoObj.get(0).addEventListener("webkitbeginfullscreen",function(){isFullscreen=true},false);$videoObj.get(0).addEventListener("webkitendfullscreen",function(){isFullscreen=false},false);$("head").append("");var $videoFullscreen=$(".html5boxFullscreen",$videoControls);$videoFullscreen.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+ "px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_fullscreen.png"+"')","background-position":"left top"}).hover(function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" bottom"})},function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]: $(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" top"})}).bind(eClick,function(){isFullscreen=!isFullscreen;switchScreen(isFullscreen)})}if(hd){var $videoHD=$(".html5boxHD",$videoControls);$videoHD.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_hd.png"+"')","background-position":(isHd?"right": "left")+" center"}).bind(eClick,function(){isHd=!isHd;$(this).css({"background-position":(isHd?"right":"left")+" center"});parentInst.isHd=isHd;var isPaused=$videoObj.get(0).isPaused;$videoObj.get(0).setAttribute("src",(isHd?hd:src)+"#t="+$videoObj.get(0).currentTime);if(!isPaused)$videoObj.get(0).play();else if(!isIPhone)$videoObj.get(0).pause()})}var volume=$videoObj.get(0).volume;$videoObj.get(0).volume=volume/2+0.1;if($videoObj.get(0).volume===volume/2+0.1){$videoObj.get(0).volume=volume;var $videoVolume= $(".html5boxVolume",$videoControls);var $videoVolumeButton=$(".html5boxVolumeButton",$videoControls);var $videoVolumeBar=$(".html5boxVolumeBar",$videoControls);var $videoVolumeBarBg=$(".html5boxVolumeBarBg",$videoControls);var $videoVolumeBarActive=$(".html5boxVolumeBarActive",$videoControls);$videoVolume.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2)}).hover(function(){clearTimeout(hideVolumeBarTimeoutId); var volume=$videoObj.get(0).volume;$videoVolumeBarActive.css({height:Math.round(volume*100)+"%"});$videoVolumeBar.show()},function(){clearTimeout(hideVolumeBarTimeoutId);hideVolumeBarTimeoutId=setTimeout(function(){$videoVolumeBar.hide()},1E3)});$videoVolumeButton.css({display:"block",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_volume.png"+"')","background-position":"top left"}).hover(function(){var backgroundPosX= $(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" bottom"})},function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" top"})}).bind(eClick,function(){var volume=$videoObj.get(0).volume;if(volume>0){volumeSaved=volume;volume=0}else volume= volumeSaved;var backgroundPosY=$(this).css("background-position")?$(this).css("background-position").split(" ")[1]:$(this).css("background-position-y");$videoVolumeButton.css({"background-position":(volume>0?"left":"right")+" "+backgroundPosY});$videoObj.get(0).volume=volume;$videoVolumeBarActive.css({height:Math.round(volume*100)+"%"})});$videoVolumeBar.css({display:"none",position:"absolute",left:4,bottom:"100%",width:24,height:80,"margin-bottom":Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),"background-color":"#000000", opacity:0.7,filter:"alpha(opacity=70)"});$videoVolumeBarBg.css({display:"block",position:"relative",width:10,height:68,margin:7,cursor:"pointer","background-color":"#222"});$videoVolumeBarActive.css({display:"block",position:"absolute",bottom:0,left:0,width:"100%",height:"100%","background-color":"#fcc500"});$videoVolumeBarBg.bind(eStart,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var vol=1-(e0.pageY-$videoVolumeBarBg.offset().top)/$videoVolumeBarBg.height();vol=vol>1?1:vol<0?0:vol;$videoVolumeBarActive.css({height:Math.round(vol* 100)+"%"});$videoVolumeButton.css({"background-position":"left "+(vol>0?"top":"bottom")});$videoObj.get(0).volume=vol;$videoVolumeBarBg.bind(eMove,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var vol=1-(e0.pageY-$videoVolumeBarBg.offset().top)/$videoVolumeBarBg.height();vol=vol>1?1:vol<0?0:vol;$videoVolumeBarActive.css({height:Math.round(vol*100)+"%"});$videoVolumeButton.css({"background-position":"left "+(vol>0?"top":"bottom")});$videoObj.get(0).volume=vol})}).bind(eCancel,function(){$videoVolumeBarBg.unbind(eMove)})}var calcTimeFormat= function(seconds){var h0=Math.floor(seconds/3600);var h=h0<10?"0"+h0:h0;var m0=Math.floor((seconds-h0*60)/60);var m=m0<10?"0"+m0:m0;var s0=Math.floor(seconds-(h0*3600+m0*60));var s=s0<10?"0"+s0:s0;var r=m+":"+s;if(h0>0)r=h+":"+r;return r};var onVideoPlay=function(){$videoPlay.hide();$videoBtnPlay.hide();$videoBtnPause.show()};var onVideoPause=function(){$videoControls.show();clearTimeout(hideControlsTimerId);$videoPlay.show();$videoBtnPlay.show();$videoBtnPause.hide()};var onVideoUpdate=function(){var curTime= $videoObj.get(0).currentTime;if(curTime){$videoTimeCurrent.text(calcTimeFormat(curTime));var duration=$videoObj.get(0).duration;if(duration){$videoTimeTotal.text(calcTimeFormat(duration));if(!sliderDragging){var sliderW=$videoSeeker.width();var pos=Math.round(sliderW*curTime/duration);$videoSeekerPlay.css({width:pos});$videoSeekerHandler.css({left:pos})}}}};var onVideoProgress=function(){if($videoObj.get(0).buffered&&$videoObj.get(0).buffered.length>0&&!isNaN($videoObj.get(0).buffered.end(0))&&!isNaN($videoObj.get(0).duration)){var sliderW= $videoSeeker.width();$videoSeekerBuffer.css({width:Math.round(sliderW*$videoObj.get(0).buffered.end(0)/$videoObj.get(0).duration)})}};try{$videoObj.bind("play",onVideoPlay);$videoObj.bind("pause",onVideoPause);$videoObj.bind("ended",onVideoPause);$videoObj.bind("timeupdate",onVideoUpdate);$videoObj.bind("progress",onVideoProgress)}catch(e){}}})(jQuery);(function($){var ELEM_ID=0,ELEM_THUMBNAIL=1,ELEM_SRC=2,ELEM_SRC_OGG=3,ELEM_SRC_WEBM=4,ELEM_LINK=5,ELEM_LINKTARGET=6,ELEM_TITLE=7,ELEM_INFORMATION= 8,ELEM_TYPE=9,ELEM_WIDTH=10,ELEM_HEIGHT=11,ELEM_POSTER=12,ELEM_HD=13,ELEM_HD_OGG=14,ELEM_HD_WEBM=15,ELEM_DURATION=16,ELEM_LIGHTBOXWIDTH=17,ELEM_LIGHTBOXHEIGHT=18,ELEM_YOUTUBEAPIKEY=19,ELEM_YOUTUBEPLAYLISTID=20,ELEM_YOUTUBEPLAYLISTMAXRESULTS=21;var TYPE_IMAGE=1,TYPE_SWF=2,TYPE_MP3=3,TYPE_PDF=4,TYPE_VIDEO_FLASH=5,TYPE_VIDEO_MP4=6,TYPE_VIDEO_OGG=7,TYPE_VIDEO_WEBM=8,TYPE_VIDEO_YOUTUBE=9,TYPE_VIDEO_VIMEO=10,TYPE_EMBED_VIDEO=11,TYPE_IFRAME=12,TYPE_YOUTUBE_PLAYLIST=13;var html5GalleryId=0;$.fn.wonderplugingallery= function(options){var Html5Gallery=function(container,options,id){this.container=container;this.options=options;this.id=id;this.options.flashInstalled=false;try{if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))this.options.flashInstalled=true}catch(e){if(navigator.mimeTypes["application/x-shockwave-flash"])this.options.flashInstalled=true}this.options.html5VideoSupported=!!document.createElement("video").canPlayType;this.options.isChrome=navigator.userAgent.match(/Chrome/i)!=null;this.options.isFirefox= navigator.userAgent.match(/Firefox/i)!=null;this.options.isOpera=navigator.userAgent.match(/Opera/i)!=null||navigator.userAgent.match(/OPR\//i)!=null;this.options.isSafari=navigator.userAgent.match(/Safari/i)!=null;this.options.isIE11=navigator.userAgent.match(/Trident\/7/)!=null&&navigator.userAgent.match(/rv:11/)!=null;this.options.isIE=navigator.userAgent.match(/MSIE/i)!=null&&!this.options.isOpera;this.options.isIE10=navigator.userAgent.match(/MSIE 10/i)!=null&&!this.options.isOpera;this.options.isIE9= navigator.userAgent.match(/MSIE 9/i)!=null&&!this.options.isOpera;this.options.isIE8=navigator.userAgent.match(/MSIE 8/i)!=null&&!this.options.isOpera;this.options.isIE7=navigator.userAgent.match(/MSIE 7/i)!=null&&!this.options.isOpera;this.options.isIE6=navigator.userAgent.match(/MSIE 6/i)!=null&&!this.options.isOpera;this.options.isIE678=this.options.isIE6||this.options.isIE7||this.options.isIE8;this.options.isIE6789=this.options.isIE6||this.options.isIE7||this.options.isIE8||this.options.isIE9; this.options.isAndroid=navigator.userAgent.match(/Android/i)!=null;this.options.isIPad=navigator.userAgent.match(/iPad/i)!=null;this.options.isIPhone=navigator.userAgent.match(/iPod/i)!=null||navigator.userAgent.match(/iPhone/i)!=null;this.options.isIOS=this.options.isIPad||this.options.isIPhone;this.options.isMobile=this.options.isAndroid||this.options.isIPad||this.options.isIPhone;this.options.isIOSLess5=this.options.isIPad&&this.options.isIPhone&&(navigator.userAgent.match(/OS 4/i)!=null||navigator.userAgent.match(/OS 3/i)!= null);this.options.supportCSSPositionFixed=!this.options.isIE6&&!this.options.isIOSLess5;this.isTouch="ontouchstart"in window;this.eStart=this.isTouch?"touchstart":"mousedown";this.eMove=this.isTouch?"touchmove":"mousemove";this.eCancel=this.isTouch?"touchcancel":"mouseup";this.eClick=this.isTouch?"touchstart":"click";this.slideshowTimeout=null;this.slideTimer=null;this.slideTimerCount=0;this.looptimes=0;this.updateCarouselTimeout=null;this.disableupdatecarousel=false;this.hideTitleTimeout=null;this.hideToolboxTimeout= null;this.isHd=this.options.hddefault;this.isHTML5=false;this.elemArray=[];$(".html5gallery-loading").hide();this.container.children().hide();this.container.css({"display":"block","position":"relative"});if(this.options.googlefonts&&this.options.googlefonts.length>0){var fontRef=("https:"==document.location.protocol?"https":"http")+"://fonts.googleapis.com/css?family="+this.options.googlefonts;var fontLink=document.createElement("link");fontLink.setAttribute("rel","stylesheet");fontLink.setAttribute("type", "text/css");fontLink.setAttribute("href",fontRef);document.getElementsByTagName("head")[0].appendChild(fontLink)}this.initData(this.processElemArray)};Html5Gallery.prototype={getParams:function(){var result={};var params=window.location.search.substring(1).split("&");for(var i=0;i0;i--){var index=Math.floor(Math.random()*i);var t=instance.elemArray[i];instance.elemArray[i]=instance.elemArray[index];instance.elemArray[index]=t}instance.initYoutubeApi();instance.options.showcarousel=instance.elemArray.length>1&&instance.options.showcarousel;instance.options.watermarkcode="";if(instance.options.fv)instance.options.watermarkcode="";else if(instance.options.watermarklink.length>0)instance.options.watermarkcode= "";var freeCss;if(instance.options.fv)freeCss="display:none;visibility:visible;position:absolute;top:10px;left:10px;width:180px;height:18px;line-height:18px;text-align:center;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:#fff;color:#333;font-size:12px;font-family:Arial,Helvetica,sans-serif;";else if(instance.options.watermark.length>0)freeCss="display:block;position:absolute;top:0px;left:0px;"; else freeCss="display:none;";instance.options.watermarkcode+="
";if(instance.options.fv)instance.options.watermarkcode+=instance.options.fvm;else if(instance.options.watermark.length>0)instance.options.watermarkcode+="";instance.options.watermarkcode+="
";if(instance.options.fv||instance.options.watermarklink.length>0)instance.options.watermarkcode+= "
";instance.createStyle();instance.createMarkup();instance.createImageToolbox();if(instance.elemArray.length<=0)return;instance.createEvents();instance.loadCarousel();instance.savedElem=-1;instance.curElem=-1;instance.nextElem=-1;instance.prevElem=-1;instance.isPaused=!instance.options.autoslide;instance.isFullscreen=false;instance.showingPoster=false;instance.disableTouchSwipe=false;var params=instance.getParams();instance.slideRun(params["html5galleryid"]&¶ms["html5galleryid"]in instance.elemArray? params["html5galleryid"]:0);if(instance.options.responsive){instance.resizeGallery();$(window).resize(function(){instance.resizeGallery()})}},resizeGallery:function(){switch(this.options.skin){case "vertical":case "showcase":this.resizeStyleVertical();break;case "light":case "horizontal":case "darkness":case "gallery":default:this.resizeStyleDefault()}this.resizeImageToolbox()},initData:function(onSuccess){this.elemArray=[];if(this.options.src&&this.options.src.length>0){var mediaType=this.options.mediatype? this.options.mediatype:this.checkType(this.options.src);this.elemArray.push(new Array(0,"",this.options.src,this.options.webm,this.options.ogg,"","",this.options.title?this.options.title:"",this.options.title?this.options.title:"",mediaType,this.options.width,this.options.height,this.options.poster,this.options.hd,this.options.hdogg,this.options.hdwebm));this.readTags();onSuccess(this)}else if(this.options.xml&&this.options.xml.length>0){if(this.options.xmlnocache){this.options.xml+=this.options.xml.indexOf("?")< 0?"?":"&";this.options.xml+=Math.random()}var instance=this;$.ajax({type:"GET",url:this.options.xml,dataType:"xml",success:function(xmldata){$(xmldata).find("slide").each(function(index,value){var title=$(this).find("title").text();var information=$(this).find("description").text()?$(this).find("description").text():$(this).find("information").text();if(!title)title="";if(!information)information="";var mediaType=$(this).find("mediatype").text()?$(this).find("mediatype").text():instance.checkType($(this).find("file").text()); instance.elemArray.push(new Array($(this).find("id").length?$(this).find("id").text():index,$(this).find("thumbnail").text(),$(this).find("file").text(),$(this).find("file-ogg").text(),$(this).find("file-webm").text(),$(this).find("link").text(),$(this).find("linktarget").text(),title,information,mediaType,$(this).find("width").length&&!isNaN(parseInt($(this).find("width").text()))?parseInt($(this).find("width").text()):instance.options.width,$(this).find("height").length&&!isNaN(parseInt($(this).find("height").text()))? parseInt($(this).find("height").text()):instance.options.height,$(this).find("poster").text(),$(this).find("hd").text(),$(this).find("hdogg").text(),$(this).find("hdwebm").text(),$(this).find("duration").text(),$(this).find("lightboxwidth").text(),$(this).find("lightboxheight").text()))});instance.readTags();onSuccess(instance)}})}else if(this.options.remote&&this.options.remote.length>0){var instance=this;$.getJSON(this.options.remote,function(data){for(var i=0;i"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"");this.$gallery.appendTo(this.container);if(!this.options.socialurlforeach)this.createSocialMedia();if(this.options.googleanalyticsaccount&&!window._gaq){window._gaq=window._gaq||[];window._gaq.push(["_setAccount", this.options.googleanalyticsaccount]);window._gaq.push(["_trackPageview"]);$.getScript(("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js")}},createSocialMedia:function(){$(".html5gallery-viral-"+this.id,this.$gallery).empty();var elemUrl=window.location.href;if(this.options.socialurlforeach)elemUrl+=(window.location.href.indexOf("?")<0?"?":"&")+"html5galleryid="+this.elemArray[this.curElem][ELEM_ID];if(this.options.showsocialmedia&&this.options.showfacebooklike){var facebook= "
"; $(".html5gallery-viral-"+this.id,this.$gallery).append(facebook)}if(this.options.showsocialmedia&&this.options.showtwitter){var twitter="
";$(".html5gallery-viral-"+this.id,this.$gallery).append(twitter);$.getScript(("https:"==document.location.protocol?"https:":"http:")+"//platform.twitter.com/widgets.js")}if(this.options.showsocialmedia&&this.options.showgoogleplus){var googlePlus="
0)googlePlus+=" data-href='"+this.options.googleplusurl+"'";else googlePlus+=" data-href='"+elemUrl+"'";googlePlus+=">
";$(".html5gallery-viral-"+this.id,this.$gallery).append(googlePlus);$.getScript("https://apis.google.com/js/plusone.js")}},playGallery:function(){var instance=this;$(".html5gallery-play-"+instance.id,instance.$gallery).hide();$(".html5gallery-pause-"+instance.id,instance.$gallery).show();instance.isPaused=false;var slideshowinterval=instance.elemArray[instance.curElem][ELEM_DURATION]? instance.elemArray[instance.curElem][ELEM_DURATION]:instance.options.slideshowinterval;instance.slideshowTimeout=setTimeout(function(){instance.slideRun(-1)},slideshowinterval);$(".html5gallery-timer-"+instance.id,instance.$gallery).css({width:0});instance.slideTimerCount=0;if(instance.options.showtimer)instance.slideTimer=setInterval(function(){instance.showSlideTimer()},50)},pauseGallery:function(){var instance=this;$(".html5gallery-play-"+instance.id,instance.$gallery).show();$(".html5gallery-pause-"+ instance.id,instance.$gallery).hide();instance.isPaused=true;clearTimeout(instance.slideshowTimeout);$(".html5gallery-timer-"+instance.id,instance.$gallery).css({width:0});clearInterval(instance.slideTimer);instance.slideTimerCount=0},createEvents:function(){var instance=this;$(".html5gallery-play-"+this.id,this.$gallery).click(function(){instance.playGallery()});$(".html5gallery-pause-"+this.id,this.$gallery).click(function(){instance.pauseGallery()});$(".html5gallery-lightbox-"+this.id,this.$gallery).click(function(){instance.goFullscreen()}); $(".html5gallery-left-"+this.id,this.$gallery).click(function(){instance.slideRun(-2,true)});$(".html5gallery-right-"+this.id,this.$gallery).click(function(){instance.slideRun(-1,true)});if(instance.options.enabletouchswipe){var preventBrowser=instance.options.isAndroid&&instance.options.enabletouchswipeonandroid?true:false;$(".html5gallery-box-"+this.id,this.$gallery).touchSwipe({preventWebBrowser:preventBrowser,swipeLeft:function(){if(!instance.disableTouchSwipe)instance.slideRun(-1,true)},swipeRight:function(){if(!instance.disableTouchSwipe)instance.slideRun(-2, true)}})}$(".html5gallery-box-"+this.id,this.$gallery).mousemove(function(){if(instance.options.imagetoolboxmode=="mouseover"){var type=instance.elemArray[instance.curElem][ELEM_TYPE];if(instance.options.showimagetoolbox=="always"||instance.options.showimagetoolbox=="image"&&type==TYPE_IMAGE)instance.showimagetoolbox(type,true)}});$(".html5gallery-box-"+this.id,this.$gallery).hover(function(){instance.onSlideshowOver();if(instance.options.imagetoolboxmode=="mouseover"){var type=instance.elemArray[instance.curElem][ELEM_TYPE]; if(instance.options.showimagetoolbox=="always"||instance.options.showimagetoolbox=="image"&&type==TYPE_IMAGE)instance.showimagetoolbox(type)}},function(){if(instance.options.imagetoolboxmode=="mouseover")instance.hideimagetoolbox()});$(".html5gallery-container-"+this.id).mousemove(function(){if(instance.options.titleoverlay&&instance.options.titleautohide){$(".html5gallery-title-"+instance.id,instance.$gallery).show();clearTimeout(instance.hideTitleTimeout);instance.hideTitleTimeout=setTimeout(function(){$(".html5gallery-title-"+ instance.id,instance.$gallery).fadeOut()},3E3)}});$(".html5gallery-container-"+this.id).hover(function(){if(instance.options.titleoverlay&&instance.options.titleautohide){$(".html5gallery-title-"+instance.id,instance.$gallery).fadeIn();clearTimeout(instance.hideTitleTimeout);instance.hideTitleTimeout=setTimeout(function(){$(".html5gallery-title-"+instance.id,instance.$gallery).fadeOut()},3E3)}},function(){if(instance.options.titleoverlay&&instance.options.titleautohide){$(".html5gallery-title-"+instance.id, instance.$gallery).fadeOut();clearTimeout(instance.hideTitleTimeout)}});$(".html5gallery-car-left-"+this.id,this.$gallery).css({"background-position":"-"+String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$(".html5gallery-car-left-"+this.id,this.$gallery).data("disabled",true);$(".html5gallery-car-right-"+this.id,this.$gallery).css({"background-position":"0px 0px"});$(".html5gallery-car-left-"+this.id,this.$gallery).click(function(){if(!$(this).data("disabled")){instance.disableupdatecarousel= true;instance.updateCarouselTimeout=setTimeout(function(){instance.enableUpdateCarousel()},instance.options.updatecarouselinterval);instance.carouselPrev()}});$(".html5gallery-car-right-"+this.id,this.$gallery).click(function(){if(!$(this).data("disabled")){instance.disableupdatecarousel=true;instance.updateCarouselTimeout=setTimeout(function(){instance.enableUpdateCarousel()},instance.options.updatecarouselinterval);instance.carouselNext()}});$(".html5gallery-car-slider-"+this.id,this.$gallery).bind("drag", function(event,data){instance.disableupdatecarousel=true;instance.updateCarouselTimeout=setTimeout(function(){instance.enableUpdateCarousel()},instance.options.updatecarouselinterval);instance.carouselSliderDrag(event,data)});$(".html5gallery-car-slider-bar-"+this.id,this.$gallery).click(function(event){instance.disableupdatecarousel=true;instance.updateCarouselTimeout=setTimeout(function(){instance.enableUpdateCarousel()},instance.options.updatecarouselinterval);instance.carouselBarClicked(event)}); $(".html5gallery-car-left-"+this.id,this.$gallery).hover(function(){if(!$(this).data("disabled"))$(this).css({"background-position":"-"+instance.options.carouselarrowwidth+"px 0px"})},function(){if(!$(this).data("disabled"))$(this).css({"background-position":"0px 0px"})});$(".html5gallery-car-right-"+this.id,this.$gallery).hover(function(){if(!$(this).data("disabled"))$(this).css({"background-position":"-"+instance.options.carouselarrowwidth+"px 0px"})},function(){if(!$(this).data("disabled"))$(this).css({"background-position":"0px 0px"})})}, createStyle:function(){switch(this.options.skin){case "vertical":case "showcase":this.createStyleVertical();break;case "light":case "horizontal":case "darkness":case "gallery":case "mediapage":default:this.createStyleDefault()}},resizeStyleVertical:function(){if(!this.container.parent()||!this.container.parent().width())return;this.options.containerWidth=this.container.parent().width();this.options.totalWidth=this.options.containerWidth;if(this.options.showcarousel)if(this.options.carouselposition== "bottom")this.options.carouselWidth=this.options.width;else this.options.carouselWidth=this.options.thumbwidth;if(this.options.carouselposition=="bottom")this.options.width=this.options.totalWidth-2*this.options.padding;else{this.options.width=this.options.totalWidth-2*this.options.padding;if(this.options.carouselWidth+this.options.carouselmargin>0)this.options.width-=this.options.carouselWidth+this.options.carouselmargin}if(this.options.responsivefullscreen&&this.container.parent().height()>0){this.options.containerHeight= this.container.parent().height();this.options.totalHeight=this.options.containerHeight;if(this.options.carouselposition=="bottom")this.options.height=this.options.totalHeight-(this.options.headerHeight+2*this.options.padding+this.options.carouselheight);else this.options.height=this.options.totalHeight-(this.options.headerHeight+2*this.options.padding)}else{this.options.height=Math.round(this.options.width*this.options.originalHeight/this.options.originalWidth);if(this.options.carouselposition=="bottom")this.options.totalHeight= this.options.height+this.options.headerHeight+2*this.options.padding+this.options.carouselmargin+this.options.carouselHeight;else this.options.totalHeight=this.options.height+this.options.headerHeight+2*this.options.padding;this.options.containerHeight=this.options.totalHeight}this.container.css({"width":this.options.containerWidth,"height":this.options.containerHeight});this.options.boxWidth=this.options.width;this.options.boxHeight=this.options.height+this.options.headerHeight;if(this.options.slideshadow)this.options.boxWidth+= 8;if(this.options.showcarousel)if(this.options.carouselposition=="bottom"){this.options.carouselWidth=this.options.width;this.options.carouselHeight=this.options.carouselheight;this.options.carouselLeft=this.options.padding;this.options.carouselTop=this.options.height+this.options.headerHeight+2*this.options.padding;this.options.carAreaLength=this.options.carouselHeight;this.options.carouselSlider=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap)).html5gallery-tn-title-"+this.id+" {width: "+ titleWidth+"px;}")}else{this.options.carouselWidth=this.options.thumbwidth;this.options.carouselHeight=this.options.height+this.options.headerHeight;this.options.carTop=0;this.options.carBottom=0;this.options.carAreaLength=this.options.carouselHeight-this.options.carTop-this.options.carBottom;this.options.carouselSlider=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap))1?1:scale}else if(this.options.resizemode=="fill")scale=Math.max(this.options.width/imageWidth,this.options.height/imageHeight);else scale=Math.min(this.options.width/imageWidth,this.options.height/imageHeight);var w=Math.round(scale* imageWidth);var h=Math.round(scale*imageHeight);var w1=this.isFullscreen?w:this.options.width;var h1=this.isFullscreen?h:this.options.height;var l=Math.round(w1/2-w/2);var t=Math.round(h1/2-h/2);if(this.isFullscreen)this.adjustFullscreen(w1,h1,true);$(".html5gallery-elem-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-img-"+this.id).css({width:w1+"px",height:h1+"px"});$(".html5gallery-elem-image-"+this.id).css({width:w+"px",height:h+"px",top:t+"px",left:l+"px"})}else if(type== TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM||type==TYPE_VIDEO_YOUTUBE||type==TYPE_VIDEO_VIMEO||type==TYPE_EMBED_VIDEO){var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){var fullW=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):this.fullscreenWidth;var fullH=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]? Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):this.fullscreenHeight;scale=Math.min(fullW/dataW,fullH/dataH);scale=scale>1?1:scale;w1=Math.round(scale*dataW);h1=Math.round(scale*dataH);this.adjustFullscreen(w1,h1,true)}else{w1=this.options.width;h1=this.options.height}$(".html5gallery-elem-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-container-"+this.id).css({"width":w1+ "px","height":h1+"px"});var h2=this.options.isIPhone?h1-48:h1;$(".html5gallery-elem-video-container-"+this.id).find("video").css({"width":w1+"px","height":h2+"px"});$("#html5gallery-elem-video-"+this.id).css({"width":w1+"px","height":h1+"px"});$("#html5gallery-elem-video-"+this.id).attr("width",w1);$("#html5gallery-elem-video-"+this.id).attr("height",h1);$(".html5gallery-elem-video-"+this.id).find("iframe").attr("width",w1);$(".html5gallery-elem-video-"+this.id).find("iframe").attr("height",h1);$("#html5gallery-elem-video-"+ this.id).find("iframe").attr("width",w1);$("#html5gallery-elem-video-"+this.id).find("iframe").attr("height",h1)}else if(type==TYPE_SWF);var titleTop=0;var socialTop=0;if(this.options.headerpos=="bottom"){titleTop=this.options.titleoverlay?this.options.height-this.options.titleheight:this.options.height;socialTop=this.options.titleoverlay?this.options.height:this.options.height+this.options.titleheight}$(".html5gallery-title-"+this.id).css({width:this.options.boxWidth+"px"});if(!this.options.titleoverlay)$(".html5gallery-title-"+ this.id).css({top:titleTop+"px"});$(".html5gallery-viral-"+this.id).css({top:socialTop+"px"});$(".html5gallery-timer-"+this.id).css({top:String(this.options.elemTop+this.options.height-2)+"px"});if(this.options.showcarousel){$(".html5gallery-car-"+this.id).css({width:this.options.carouselWidth+"px",height:this.options.carouselHeight+"px",top:this.options.carouselTop+"px",left:this.options.carouselLeft+"px",top:this.options.carouselTop+"px"});$(".html5gallery-car-list-"+this.id).css({top:this.options.carTop+ "px",height:String(this.options.carAreaLength)+"px",width:this.options.carouselWidth+"px"});this.options.thumbShowNum=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap));this.options.thumbMaskHeight=this.options.thumbShowNum*this.options.thumbheight+(this.options.thumbShowNum-1)*this.options.thumbgap;this.options.thumbTotalHeight=this.elemArray.length*this.options.thumbheight+(this.elemArray.length-1)*this.options.thumbgap;if(this.options.carouselSlider){this.options.carouselSliderMin= 0;this.options.carouselSliderMax=this.options.thumbMaskHeight-54;$(".html5gallery-car-slider-bar-"+this.id).css({height:this.options.thumbMaskHeight+"px"});$(".html5gallery-car-slider-bar-middle-"+this.id).css({height:String(this.options.thumbMaskHeight-32)+"px"});if(this.options.isMobile)$(".html5gallery-car-right-"+this.id).css({top:String(this.options.thumbMaskHeight-35)+"px"});$(".html5gallery-car-slider-bar-"+this.id).css({display:"block"});$(".html5gallery-car-left-"+this.id).css({display:"block"}); $(".html5gallery-car-right-"+this.id).css({display:"block"});$(".html5gallery-car-slider-"+this.id).css({display:"block"})}var maskTop=0;if(this.options.carouselNavButton)maskTop=Math.round(this.options.carAreaLength/2-this.options.thumbMaskHeight/2);$(".html5gallery-car-mask-"+this.id).css({top:maskTop+"px",height:this.options.thumbMaskHeight+"px"});this.carouselHighlight(this.curElem)}},createStyleVertical:function(){if(this.options.thumbshowtitle)this.options.thumbimagewidth=this.options.thumbheight- 2*this.options.thumbimageborder-4;else this.options.thumbimagewidth=this.options.thumbwidth-2*this.options.thumbimageborder-4;this.options.thumbimageheight=this.options.thumbheight-2*this.options.thumbimageborder-4;if(!this.options.showtitle)this.options.titleheight=0;if(!this.options.showsocialmedia||!this.options.showfacebooklike&&!this.options.showtwitter&&!this.options.showgoogleplus)this.options.socialheight=0;this.options.headerHeight=this.options.titleoverlay?this.options.socialheight:this.options.titleheight+ this.options.socialheight;this.options.boxWidth=this.options.width;this.options.boxHeight=this.options.height+this.options.headerHeight;this.options.boxLeft=this.options.padding;this.options.boxTop=this.options.padding;if(this.options.slideshadow)this.options.boxWidth+=8;if(this.options.showcarousel)if(this.options.carouselposition=="bottom"){this.options.carouselWidth=this.options.width;this.options.carouselHeight=this.options.carouselheight;this.options.carouselLeft=this.options.padding;this.options.carouselTop= this.options.height+this.options.headerHeight+2*this.options.padding;this.options.carAreaLength=this.options.carouselHeight;this.options.carouselSlider=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap))0)styleCss+=" .html5gallery-elem-"+this.id+" { overflow:hidden; border-radius:"+this.options.borderradius+"px; -moz-border-radius:"+this.options.borderradius+"px; -webkit-border-radius:"+this.options.borderradius+"px;}";if(this.options.slideshadow){styleCss+= " .html5gallery-title-"+this.id+" { padding:4px;}";styleCss+=" .html5gallery-timer-"+this.id+" { margin:4px;}";styleCss+=" .html5gallery-elem-"+this.id+" { overflow:hidden; padding:4px; -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}"}if(this.options.showcarousel){styleCss+=" .html5gallery-car-"+this.id+" { position:absolute; display:block; overflow:hidden; width:"+this.options.carouselWidth+"px; height:"+this.options.carouselHeight+"px; left:"+ this.options.carouselLeft+"px; top:"+this.options.carouselTop+"px; }";styleCss+=" .html5gallery-car-list-"+this.id+" { position:absolute; display:block; overflow:hidden; top:"+this.options.carTop+"px; height:"+String(this.options.carAreaLength)+"px; left:0px; width:"+this.options.carouselWidth+"px; "+"}";styleCss+=".html5gallery-thumbs-"+this.id+" {margin-top:0px; height:"+String(this.elemArray.length*(this.options.thumbheight+this.options.thumbgap))+"px;}";this.options.thumbShowNum=Math.floor(this.options.carAreaLength/ (this.options.thumbheight+this.options.thumbgap));this.options.thumbMaskHeight=this.options.thumbShowNum*this.options.thumbheight+(this.options.thumbShowNum-1)*this.options.thumbgap;this.options.thumbTotalHeight=this.elemArray.length*this.options.thumbheight+(this.elemArray.length-1)*this.options.thumbgap;this.options.carouselSliderMin=0;this.options.carouselSliderMax=this.options.thumbMaskHeight-54;styleCss+=" .html5gallery-car-slider-bar-"+this.id+" { position:absolute; display:"+(this.options.carouselSlider? "block":"none")+"; overflow:hidden; top:0px; height:"+this.options.thumbMaskHeight+"px; left:"+String(this.options.thumbwidth+6)+"px; width:14px;}";styleCss+=" .html5gallery-car-slider-bar-top-"+this.id+" { position:absolute; display:block; top:0px; left:0px; width:14px; height:16px; background:url('"+this.options.skinfolder+"bartop.png')}";styleCss+=" .html5gallery-car-slider-bar-middle-"+this.id+" { position:absolute; display:block; top:16px; left:0px; width:14px; height:"+String(this.options.thumbMaskHeight- 32)+"px; background:url('"+this.options.skinfolder+"bar.png')}";styleCss+=" .html5gallery-car-slider-bar-bottom-"+this.id+" { position:absolute; display:block; bottom:0px; left:0px; width:14px; height:16px; background:url('"+this.options.skinfolder+"barbottom.png')}";if(this.options.isMobile)styleCss+=" .html5gallery-car-left-"+this.id+" { position:absolute; display:"+(this.options.carouselSlider?"block":"none")+"; cursor:pointer; overflow:hidden; width:16px; height:35px; left:"+String(this.options.thumbwidth+ 5)+"px; top:0px; background:url('"+this.options.skinfolder+"slidertop.png')} "+" .html5gallery-car-right-"+this.id+" { position:absolute; display:"+(this.options.carouselSlider?"block":"none")+"; cursor:pointer; overflow:hidden; width:16px; height:35px; left:"+String(this.options.thumbwidth+5)+"px; top:"+String(this.options.thumbMaskHeight-35)+"px; background:url('"+this.options.skinfolder+"sliderbottom.png')} ";else styleCss+=" .html5gallery-car-slider-"+this.id+" { position:absolute; display:"+ (this.options.carouselSlider?"block":"none")+"; overflow:hidden; cursor:pointer; top:0px; height:54px; left:"+String(this.options.thumbwidth+5)+"px; width:16px; background:url('"+this.options.skinfolder+"slider.png');}";var maskTop=0;if(this.options.carouselNavButton)maskTop=Math.round(this.options.carAreaLength/2-this.options.thumbMaskHeight/2);styleCss+=" .html5gallery-car-mask-"+this.id+" { position:absolute; display:block; overflow:hidden; top:"+maskTop+"px; height:"+this.options.thumbMaskHeight+ "px; left:0px; width:"+this.options.thumbwidth+"px;} ";var tabHeight=this.options.thumbheight;if(!this.options.isIE)tabHeight=this.options.thumbheight-2;styleCss+=" .html5gallery-tn-"+this.id+" { display:block; margin-bottom:"+this.options.thumbgap+"px; text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+tabHeight+"px;overflow:hidden;";if(this.options.carouselbgtransparent)styleCss+="background-color:transparent;";else{if(!this.options.isIE)styleCss+="border-top:1px solid "+ this.options.carouseltopborder+"; border-bottom:1px solid "+this.options.carouselbottomborder+";";styleCss+="background-color: "+this.options.carouselbgcolorend+"; "+"background: "+this.options.carouselbgcolorend+" -webkit-gradient(linear, left top, left bottom, from("+this.options.carouselbgcolorstart+"), to("+this.options.carouselbgcolorend+")) no-repeat; "+"background: "+this.options.carouselbgcolorend+" -moz-linear-gradient(top, "+this.options.carouselbgcolorstart+", "+this.options.carouselbgcolorend+ ") no-repeat; "+"filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+") no-repeat; "+"-ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+")' no-repeat;"}if(this.options.carouselbgimage)styleCss+="background:url('"+this.options.skinfolder+this.options.carouselbgimage+"') center top;";styleCss+="}";styleCss+= " .html5gallery-tn-selected-"+this.id+" { display:block; margin-bottom:"+this.options.thumbgap+"px;text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+tabHeight+"px;overflow:hidden;";if(this.options.carouselbgtransparent)styleCss+="background-color:transparent;";else{if(!this.options.isIE)styleCss+="border-top:1px solid "+this.options.carouselhighlighttopborder+"; border-bottom:1px solid "+this.options.carouselhighlightbottomborder+";";styleCss+="background-color: "+this.options.carouselhighlightbgcolorend+ "; "+"background: "+this.options.carouselhighlightbgcolorend+" -webkit-gradient(linear, left top, left bottom, from("+this.options.carouselhighlightbgcolorstart+"), to("+this.options.carouselhighlightbgcolorend+")) no-repeat; "+"background: "+this.options.carouselhighlightbgcolorend+" -moz-linear-gradient(top, "+this.options.carouselhighlightbgcolorstart+", "+this.options.carouselhighlightbgcolorend+") no-repeat; "+"filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselhighlightbgcolorstart+ ", endColorstr="+this.options.carouselhighlightbgcolorend+") no-repeat; "+"-ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselhighlightbgcolorstart+", endColorstr="+this.options.carouselhighlightbgcolorend+")' no-repeat;"}if(this.options.carouselbgimage)styleCss+="background:url('"+this.options.skinfolder+this.options.carouselbgimage+"') center top;";styleCss+="}";styleCss+=" .html5gallery-tn-selected-"+this.id+" .html5gallery-tn-img-"+this.id+" {background-color:"+ this.options.thumbimagebordercolor+";}"+" .html5gallery-tn-"+this.id+" { filter:alpha(opacity="+Math.round(this.options.thumbopacity*100)+"); opacity:"+this.options.thumbopacity+"; } "+" .html5gallery-tn-selected-"+this.id+" { filter:alpha(opacity=100); opacity:1; } ";var titleWidth=this.options.thumbwidth-3*this.options.thumbmargin;if(this.options.thumbshowimage){titleWidth-=this.options.thumbimagewidth+2*this.options.thumbimageborder;var imgLeft;if(this.options.thumbshowtitle)imgLeft=this.options.thumbmargin; else imgLeft=this.options.thumbwidth/2-(this.options.thumbimagewidth+2*this.options.thumbimageborder)/2;var imgTop=Math.round((this.options.thumbheight-2)/2-(this.options.thumbimageheight+2*this.options.thumbimageborder)/2);styleCss+=" .html5gallery-tn-img-"+this.id+" {display:block; overflow:hidden; float:left; margin-top:"+imgTop+"px; margin-left:"+imgLeft+"px; width:"+String(this.options.thumbimagewidth+2*this.options.thumbimageborder)+"px;height:"+String(this.options.thumbimageheight+2*this.options.thumbimageborder)+ "px;}"}else styleCss+=" .html5gallery-tn-img-"+this.id+" {display:none;}";if(this.options.thumbshowtitle){styleCss+=" .html5gallery-tn-title-"+this.id+" {display:block; overflow:hidden; float:left; margin-top:0px; margin-left:"+this.options.thumbmargin+"px; width:"+titleWidth+"px;height:"+String(this.options.thumbheight-2)+"px;"+(this.options.thumbshowdescription?"":"line-height:"+String(this.options.thumbheight-2)+"px;")+"}";styleCss+=" .html5gallery-tn-title-"+this.id+this.options.thumbtitlecss; styleCss+=" .html5gallery-tn-description-"+this.id+this.options.thumbdescriptioncss}else{styleCss+=" .html5gallery-tn-title-"+this.id+" {display:none;}";styleCss+=" .html5gallery-tn-description-"+this.id+" {display:none;}"}this.carouselHighlight=function(index){$("#html5gallery-tn-"+this.id+"-"+index,this.$gallery).removeClass("html5gallery-tn-"+this.id).addClass("html5gallery-tn-selected-"+this.id);if(this.options.thumbShowNum>=this.elemArray.length)return;var pos=Math.floor(index/this.options.thumbShowNum)* this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos>=this.options.thumbTotalHeight-this.options.thumbMaskHeight)pos=this.options.thumbTotalHeight-this.options.thumbMaskHeight;var m1=pos/(this.elemArray.length*(this.options.thumbheight+this.options.thumbgap)-this.options.thumbMaskHeight);m1=m1*(this.options.carouselSliderMax-this.options.carouselSliderMin);$(".html5gallery-car-slider-"+this.id,this.$gallery).stop(true).animate({top:m1},300);$(".html5gallery-thumbs-"+this.id, this.$gallery).stop(true).animate({marginTop:-1*pos},300);this.updateCarouseButtons(-pos)};this.carouselBarClicked=function(event){var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);var pos;if(event.pageY>$(".html5gallery-car-slider-"+this.id,this.$gallery).offset().top){pos=-1*parseInt($thumbContainer.css("margin-top"))+this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos>=this.options.thumbTotalHeight-this.options.thumbMaskHeight)pos=this.options.thumbTotalHeight- this.options.thumbMaskHeight}else{pos=-1*parseInt($thumbContainer.css("margin-top"))-this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos<0)pos=0}$thumbContainer.stop(true).animate({marginTop:-pos},500);this.updateCarouseButtons(-pos);var m1=this.elemArray.length*(this.options.thumbheight+this.options.thumbgap)-this.options.thumbMaskHeight;pos=pos*(this.options.carouselSliderMax-this.options.carouselSliderMin)/m1;if(posthis.options.carouselSliderMax)pos=this.options.carouselSliderMax;$(".html5gallery-car-slider-"+this.id,this.$gallery).stop(true).animate({top:pos},500)};this.carouselSliderDrag=function(event,data){var pos=data.offsetY-$(".html5gallery-car-slider-bar-"+this.id,this.$gallery).offset().top;if(posthis.options.carouselSliderMax)pos=this.options.carouselSliderMax;$(".html5gallery-car-slider-"+this.id,this.$gallery).css({top:pos}); var m1=this.elemArray.length*(this.options.thumbheight+this.options.thumbgap)-this.options.thumbMaskHeight;m1=m1*pos/(this.options.carouselSliderMax-this.options.carouselSliderMin);m1=Math.round(m1/(this.options.thumbheight+this.options.thumbgap));m1=-1*m1*(this.options.thumbheight+this.options.thumbgap);$(".html5gallery-thumbs-"+this.id,this.$gallery).stop(true).animate({marginTop:m1},300)};this.carouselPrev=function(){var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);if(parseInt($thumbContainer.css("margin-top"))== 0)return;else{var pos=-1*parseInt($thumbContainer.css("margin-top"))-this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos<0)pos=0;$thumbContainer.animate({marginTop:-pos},500,this.options.carouseleasing);this.updateCarouseButtons(-pos)}};this.carouselNext=function(){var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);if(parseInt($thumbContainer.css("margin-top"))==-(this.options.thumbTotalHeight-this.options.thumbMaskHeight))return;else{var pos=-1*parseInt($thumbContainer.css("margin-top"))+ this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos>=this.options.thumbTotalHeight-this.options.thumbMaskHeight)pos=this.options.thumbTotalHeight-this.options.thumbMaskHeight;$thumbContainer.animate({marginTop:-pos},500,this.options.carouseleasing);this.updateCarouseButtons(-pos)}};this.updateCarouseButtons=function(pos){var $leftButton=$(".html5gallery-car-left-"+this.id,this.$gallery);var $rightButton=$(".html5gallery-car-right-"+this.id,this.$gallery);var rightMost= -1*(this.options.thumbTotalHeight-this.options.thumbMaskHeight);if(pos==0){$leftButton.css({"background-position":"-"+String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$leftButton.data("disabled",true)}else if($leftButton.data("disabled")){$leftButton.css({"background-position":"0px 0px",cursor:"pointer"});$leftButton.data("disabled",false)}if(pos==rightMost){$rightButton.css({"background-position":"-"+String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$rightButton.data("disabled", true)}else if($rightButton.data("disabled")){$rightButton.css({"background-position":"0px 0px",cursor:"pointer"});$rightButton.data("disabled",false)}}}else styleCss+=" .html5gallery-car-"+this.id+" { display:none; }";styleCss+=".html5gallery-container-"+this.id+" div {box-sizing:content-box;}";$("head").append("")},resizeImageToolbox:function(){if(this.options.imagetoolboxstyle!="center"){var buttonT=Math.round((this.options.headerpos== "bottom"?0:this.options.headerHeight)+this.options.height/2-24);var buttonB=buttonT+Math.round(this.options.height/2)-32;var buttonR=this.options.boxWidth-48;var buttonR1=buttonR;var buttonR2=this.options.showfullscreenbutton?buttonR1-48:buttonR1;$(".html5gallery-play-"+this.id).css({"top":buttonB+"px","left":buttonR2+"px"});$(".html5gallery-pause-"+this.id).css({"top":buttonB+"px","left":buttonR2+"px"});$(".html5gallery-left-"+this.id).css({"top":buttonT+"px"});$(".html5gallery-right-"+this.id).css({"top":buttonT+ "px","left":buttonR1+"px"});$(".html5gallery-lightbox-"+this.id).css({"top":buttonB+"px","left":buttonR1+"px"})}},createImageToolbox:function(){if(this.elemArray.length<=1)this.options.showplaybutton=this.options.showprevbutton=this.options.shownextbutton=false;if(this.options.showimagetoolbox!="never"){var styleCss;if(this.options.imagetoolboxstyle=="center"){var toolboxH=40;styleCss=" .html5gallery-toolbox-"+this.id+" {display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; overflow:hidden; position:relative; margin:0px auto; text-align:center; height:"+ toolboxH+"px;}";styleCss+=" .html5gallery-toolbox-bg-"+this.id+" {display:block; left:0px; top:0px; width:100%; height:100%; position:absolute; filter:alpha(opacity=60); opacity:0.6; background-color:#222222; }";styleCss+=" .html5gallery-toolbox-buttons-"+this.id+" {display:block; margin:0px auto; height:100%;}";styleCss+=" .html5gallery-play-"+this.id+" { position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+ Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"play.png') no-repeat top left; } ";styleCss+=" .html5gallery-pause-"+this.id+" { position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"pause.png') no-repeat top left; } ";styleCss+=" .html5gallery-left-"+ this.id+" { position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"prev.png') no-repeat top left; } ";styleCss+=" .html5gallery-right-"+this.id+" { position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+ Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"next.png') no-repeat top left; } ";styleCss+=" .html5gallery-lightbox-"+this.id+" {position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"lightbox.png') no-repeat top left; } "}else{var buttonT=Math.round((this.options.headerpos== "bottom"?0:this.options.headerHeight)+this.options.height/2-24);var buttonB=buttonT+Math.round(this.options.height/2)-32;var buttonR=this.options.width-54;var buttonR1=buttonR;var buttonR2=this.options.showfullscreenbutton?buttonR1-48:buttonR1;styleCss=" .html5gallery-toolbox-"+this.id+" {display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+";}";styleCss+=" .html5gallery-toolbox-bg-"+this.id+" {display:none;}";styleCss+=" .html5gallery-toolbox-buttons-"+this.id+" {display:block;}";styleCss+= " .html5gallery-play-"+this.id+" { position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonB+"px; left:"+buttonR2+"px; width:48px; height:48px; background:url('"+this.options.skinfolder+"side_play.png') no-repeat top left;} ";styleCss+=" .html5gallery-pause-"+this.id+" { position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonB+"px; left:"+buttonR2+"px; width:48px; height:48px; background:url('"+ this.options.skinfolder+"side_pause.png') no-repeat top left;} ";styleCss+=" .html5gallery-left-"+this.id+" { position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonT+"px; left:0px; width:48px; height:48px; background:url('"+this.options.skinfolder+"side_prev.png') no-repeat center center;} ";styleCss+=" .html5gallery-right-"+this.id+" { position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+ buttonT+"px; left:"+buttonR1+"px; width:48px; height:48px; background:url('"+this.options.skinfolder+"side_next.png') no-repeat center center;} ";styleCss+=" .html5gallery-lightbox-"+this.id+" {position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonB+"px; left:"+buttonR1+"px; width:48px; height:48px; background:url('"+this.options.skinfolder+"side_lightbox.png') no-repeat top left;} "}$(".html5gallery-play-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})}, function(){$(this).css({"background-position":"left top"})});$(".html5gallery-pause-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})},function(){$(this).css({"background-position":"left top"})});$(".html5gallery-left-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})},function(){$(this).css({"background-position":"left top"})});$(".html5gallery-right-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})}, function(){$(this).css({"background-position":"left top"})});$(".html5gallery-lightbox-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})},function(){$(this).css({"background-position":"left top"})});$("head").append("")}this.showimagetoolbox=function(type,noeffect){if(!this.options.showplaybutton&&!this.options.showprevbutton&&!this.options.shownextbutton&&!this.options.showfullscreenbutton)return; var instance=this;clearTimeout(instance.hideToolboxTimeout);instance.hideToolboxTimeout=setTimeout(function(){instance.hideimagetoolbox()},3E3);if(this.options.imagetoolboxstyle=="center"){var toolboxT=Math.round((this.options.headerpos=="bottom"?0:this.options.headerHeight)+this.options.height/2);if(type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM||type==TYPE_VIDEO_YOUTUBE||type==TYPE_VIDEO_VIMEO||type==TYPE_EMBED_VIDEO)toolboxT+=45;$(".html5gallery-toolbox-"+this.id,this.$gallery).css({"top":toolboxT}); var toolboxW=0;if(this.options.showplaybutton&&type==TYPE_IMAGE){toolboxW+=36;if(this.isPaused){$(".html5gallery-play-"+this.id,this.$gallery).show();$(".html5gallery-pause-"+this.id,this.$gallery).hide()}else{$(".html5gallery-play-"+this.id,this.$gallery).hide();$(".html5gallery-pause-"+this.id,this.$gallery).show()}}else{$(".html5gallery-play-"+this.id,this.$gallery).hide();$(".html5gallery-pause-"+this.id,this.$gallery).hide()}if(this.options.showprevbutton){toolboxW+=36;$(".html5gallery-left-"+ this.id,this.$gallery).show()}else $(".html5gallery-left-"+this.id,this.$gallery).hide();if(this.options.shownextbutton){toolboxW+=36;$(".html5gallery-right-"+this.id,this.$gallery).show()}else $(".html5gallery-right-"+this.id,this.$gallery).hide();if(this.options.showfullscreenbutton&&type==TYPE_IMAGE){toolboxW+=36;$(".html5gallery-lightbox-"+this.id,this.$gallery).show()}else $(".html5gallery-lightbox-"+this.id,this.$gallery).hide();$(".html5gallery-toolbox-"+this.id,this.$gallery).css({width:toolboxW+ 16});$(".html5gallery-toolbox-buttons-"+this.id,this.$gallery).css({width:toolboxW})}else{if(this.options.showplaybutton&&type==TYPE_IMAGE)if(this.isPaused){$(".html5gallery-play-"+this.id,this.$gallery).show();$(".html5gallery-pause-"+this.id,this.$gallery).hide()}else{$(".html5gallery-play-"+this.id,this.$gallery).hide();$(".html5gallery-pause-"+this.id,this.$gallery).show()}else{$(".html5gallery-play-"+this.id,this.$gallery).hide();$(".html5gallery-pause-"+this.id,this.$gallery).hide()}if(this.options.showprevbutton)$(".html5gallery-left-"+ this.id,this.$gallery).show();else $(".html5gallery-left-"+this.id,this.$gallery).hide();if(this.options.shownextbutton)$(".html5gallery-right-"+this.id,this.$gallery).show();else $(".html5gallery-right-"+this.id,this.$gallery).hide();if(this.options.showfullscreenbutton&&type==TYPE_IMAGE)$(".html5gallery-lightbox-"+this.id,this.$gallery).show();else $(".html5gallery-lightbox-"+this.id,this.$gallery).hide()}if(this.options.isIE678||noeffect)$(".html5gallery-toolbox-"+this.id,this.$gallery).show(); else $(".html5gallery-toolbox-"+this.id,this.$gallery).fadeIn()};this.hideimagetoolbox=function(){if(this.options.imagetoolboxmode=="show")return;clearTimeout(this.hideToolboxTimeout);if(this.options.isIE678)$(".html5gallery-toolbox-"+this.id,this.$gallery).hide();else $(".html5gallery-toolbox-"+this.id,this.$gallery).fadeOut()}},resizeStyleDefault:function(){if(!this.container.parent()||!this.container.parent().width())return;this.options.containerWidth=this.container.parent().width();this.options.totalWidth= this.options.containerWidth;this.options.width=this.options.totalWidth-2*this.options.padding;if(this.options.showcarousel){this.options.carouselHeight=this.options.thumbheight+2*this.options.thumbmargin;if(this.options.carouselmultirows){this.options.carouselcolumn=Math.floor(this.options.width/(this.options.thumbwidth+this.options.thumbgap));if(this.options.carouselcolumn<1)this.options.carouselcolumn=1;this.options.carouselHeight=Math.ceil(this.elemArray.length/this.options.carouselcolumn)*(this.options.thumbheight+ this.options.thumbrowgap)}}if(this.options.responsivefullscreen&&this.container.parent().height()>0){this.options.containerHeight=this.container.parent().height();this.options.totalHeight=this.options.containerHeight;this.options.height=this.options.totalHeight-(this.options.headerHeight+2*this.options.padding);if(this.options.carouselHeight+this.options.carouselmargin>0)this.options.height-=this.options.carouselHeight+this.options.carouselmargin}else{this.options.height=Math.round(this.options.width* this.options.originalHeight/this.options.originalWidth);this.options.totalHeight=this.options.height+this.options.carouselHeight+this.options.carouselmargin+this.options.headerHeight+2*this.options.padding;this.options.containerHeight=this.options.totalHeight}this.container.css({"width":this.options.containerWidth,"height":this.options.containerHeight});this.options.boxWidth=this.options.width;this.options.boxHeight=this.options.height+this.options.headerHeight;if(this.options.slideshadow)this.options.boxWidth+= 8;if(this.options.showcarousel){this.options.carouselWidth=this.options.width;this.options.carouselLeft=this.options.padding;this.options.carouselTop=this.options.padding+this.options.boxHeight+this.options.carouselmargin}$(".html5gallery-container-"+this.id).css({width:this.options.totalWidth+"px",height:this.options.totalHeight+"px"});$(".html5gallery-box-"+this.id).css({width:this.options.boxWidth+"px",height:this.options.boxHeight+"px"});var type=this.elemArray[this.curElem][ELEM_TYPE];if(type== TYPE_IMAGE||this.showingPoster){var imageWidth=this.elemArray[this.curElem][ELEM_WIDTH];var imageHeight=this.elemArray[this.curElem][ELEM_HEIGHT];var scale;if(this.isFullscreen){var fullW=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):this.fullscreenWidth;var fullH=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):this.fullscreenHeight; scale=Math.min(fullW/imageWidth,fullH/imageHeight);scale=scale>1?1:scale}else if(this.options.resizemode=="fill")scale=Math.max(this.options.width/imageWidth,this.options.height/imageHeight);else scale=Math.min(this.options.width/imageWidth,this.options.height/imageHeight);var w=Math.round(scale*imageWidth);var h=Math.round(scale*imageHeight);var w1=this.isFullscreen?w:this.options.width;var h1=this.isFullscreen?h:this.options.height;var l=Math.round(w1/2-w/2);var t=Math.round(h1/2-h/2);if(this.isFullscreen)this.adjustFullscreen(w1, h1,true);$(".html5gallery-elem-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-img-"+this.id).css({width:w1+"px",height:h1+"px"});$(".html5gallery-elem-image-"+this.id).css({width:w+"px",height:h+"px",top:t+"px",left:l+"px"})}else if(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM||type==TYPE_VIDEO_YOUTUBE||type==TYPE_VIDEO_VIMEO||type==TYPE_EMBED_VIDEO){var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT]; var w1,h1;if(this.isFullscreen){var fullW=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):this.fullscreenWidth;var fullH=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):this.fullscreenHeight;scale=Math.min(fullW/dataW,fullH/dataH);scale=scale>1?1:scale;w1=Math.round(scale*dataW);h1=Math.round(scale*dataH);this.adjustFullscreen(w1,h1,true)}else{w1= this.options.width;h1=this.options.height}$(".html5gallery-elem-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-container-"+this.id).css({"width":w1+"px","height":h1+"px"});var h2=this.options.isIPhone?h1-48:h1;$(".html5gallery-elem-video-container-"+this.id).find("video").css({"width":w1+"px","height":h2+"px"});$("#html5gallery-elem-video-"+this.id).css({"width":w1+"px","height":h1+"px"}); $("#html5gallery-elem-video-"+this.id).attr("width",w1);$("#html5gallery-elem-video-"+this.id).attr("height",h1);$(".html5gallery-elem-video-"+this.id).find("iframe").attr("width",w1);$(".html5gallery-elem-video-"+this.id).find("iframe").attr("height",h1);$("#html5gallery-elem-video-"+this.id).find("iframe").attr("width",w1);$("#html5gallery-elem-video-"+this.id).find("iframe").attr("height",h1)}else if(type==TYPE_SWF);var titleTop=0;var socialTop=0;if(this.options.headerpos=="bottom"){titleTop=this.options.titleoverlay? this.options.height-this.options.titleheight:this.options.height;socialTop=this.options.titleoverlay?this.options.height:this.options.height+this.options.titleheight}$(".html5gallery-title-"+this.id).css({width:this.options.boxWidth+"px"});if(!this.options.titleoverlay)$(".html5gallery-title-"+this.id).css({top:titleTop+"px"});$(".html5gallery-viral-"+this.id).css({top:socialTop+"px"});$(".html5gallery-timer-"+this.id).css({top:String(this.options.elemTop+this.options.height-2)+"px"});if(this.options.showcarousel){$(".html5gallery-car-"+ this.id).css({width:this.options.width+"px",top:this.options.carouselTop+"px"});var carLeft=4;var carRight=4;if(this.options.slideshadow)carLeft+=12;$(".html5gallery-car-list-"+this.id).css({width:String(this.options.width-carLeft-carRight)+"px"});this.options.carouselNavButton=false;if(Math.floor((this.options.width-carLeft-carRight)/(this.options.thumbwidth+this.options.thumbgap))this.options.thumbTotalWidth)marginL=this.options.thumbMaskWidth/ 2-this.options.thumbTotalWidth/2-this.options.thumbgap/2;$(".html5gallery-thumbs-"+this.id).css({"margin-left":marginL+"px",width:String(this.elemArray.length*(this.options.thumbwidth+this.options.thumbgap))+"px"})}var maskLeft=Math.round((this.options.width-carLeft-carRight)/2-this.options.thumbMaskWidth/2);$(".html5gallery-car-mask-"+this.id).css({left:maskLeft+"px",width:this.options.thumbMaskWidth+"px"});this.carouselHighlight(this.curElem,true)}},createStyleDefault:function(){this.options.thumbimagewidth= this.options.thumbwidth-2*this.options.thumbimageborder;this.options.thumbimageheight=this.options.thumbheight-2*this.options.thumbimageborder;if(this.options.thumbshowtitle)this.options.thumbheight+=this.options.thumbtitleheight;if(!this.options.showtitle)this.options.titleheight=0;if(!this.options.showsocialmedia||!this.options.showfacebooklike&&!this.options.showtwitter&&!this.options.showgoogleplus)this.options.socialheight=0;this.options.headerHeight=this.options.titleoverlay?this.options.socialheight: this.options.titleheight+this.options.socialheight;this.options.boxWidth=this.options.width;this.options.boxHeight=this.options.height+this.options.headerHeight;this.options.boxLeft=this.options.padding;this.options.boxTop=this.options.padding;if(this.options.slideshadow){this.options.boxWidth+=8;this.options.boxLeft-=4;this.options.boxTop-=4}if(this.options.showcarousel){this.options.carouselWidth=this.options.width;this.options.carouselHeight=this.options.thumbheight+2*this.options.thumbmargin; this.options.carouselLeft=this.options.padding;this.options.carouselTop=this.options.padding+this.options.boxHeight+this.options.carouselmargin;if(this.options.carouselmultirows)this.options.carouselHeight=Math.ceil(this.options.width/(this.options.thumbwidth+this.options.thumbgap))*(this.options.thumbheight+this.options.thumbrowgap)}else{this.options.carouselWidth=0;this.options.carouselHeight=0;this.options.carouselLeft=0;this.options.carouselTop=0;this.options.carouselmargin=0}this.options.totalWidth= this.options.width+2*this.options.padding;this.options.totalHeight=this.options.height+this.options.carouselHeight+this.options.carouselmargin+this.options.headerHeight+2*this.options.padding;this.options.containerWidth=this.options.totalWidth;this.options.containerHeight=this.options.totalHeight;if(this.options.responsive){this.options.originalWidth=this.options.width;this.options.originalHeight=this.options.height;this.container.css({"max-width":"100%"})}else this.container.css({"width":this.options.containerWidth, "height":this.options.containerHeight});var titleTop=0;var socialTop=0;this.options.elemTop=0;if(this.options.headerpos=="top"){socialTop=0;titleTop=this.options.socialheight;this.options.elemTop=this.options.headerHeight}else if(this.options.headerpos=="bottom"){this.options.elemTop=0;titleTop=this.options.titleoverlay?this.options.height-this.options.titleheight:this.options.height;socialTop=this.options.titleoverlay?this.options.height:this.options.height+this.options.titleheight}var styleCss= " .html5gallery-container-"+this.id+" { display:block; position:absolute; left:0px; top:0px; width:"+this.options.totalWidth+"px; height:"+this.options.totalHeight+"px; "+(!this.options.bgimage?"":"background:url('"+this.options.skinfolder+this.options.bgimage+"') center top;")+" background-color:"+this.options.bgcolor+";}";if(this.options.galleryshadow)styleCss+=" .html5gallery-container-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}"; styleCss+=" .html5gallery-box-"+this.id+" {display:block; position:absolute; text-align:center; left:"+this.options.boxLeft+"px; top:"+this.options.boxTop+"px; width:"+this.options.boxWidth+"px; height:"+this.options.boxHeight+"px;}";var viralPaddingTop=Math.round(this.options.socialheight/2-12);styleCss+=" .html5gallery-title-text-"+this.id+" "+this.options.titlecss+" .html5gallery-title-text-"+this.id+" "+this.options.titlecsslink+" .html5gallery-error-"+this.id+" "+this.options.errorcss;styleCss+= " .html5gallery-description-text-"+this.id+" "+this.options.descriptioncss+" .html5gallery-description-text-"+this.id+" "+this.options.descriptioncsslink;styleCss+=" .html5gallery-fullscreen-title-"+this.id+""+this.options.lightboxtitlecss+" .html5gallery-fullscreen-title-"+this.id+""+this.options.lightboxtitlelinkcss;styleCss+=" .html5gallery-fullscreen-description-"+this.id+""+this.options.lightboxdescriptioncss+" .html5gallery-fullscreen-description-"+this.id+""+this.options.lightboxdescriptionlinkcss; styleCss+=" .html5gallery-viral-"+this.id+" {display:block; overflow:hidden; position:absolute; text-align:left; top:"+socialTop+"px; left:0px; width:"+this.options.boxWidth+"px; height:"+this.options.socialheight+"px; padding-top:"+viralPaddingTop+"px;}";styleCss+=" .html5gallery-title-"+this.id+" {display:"+(this.options.titleoverlay&&this.options.titleautohide?"none":"block")+"; overflow:hidden; position:absolute; left:0px; width:"+this.options.boxWidth+"px; ";if(!this.options.titleoverlay)styleCss+= "top:"+titleTop+"px; height:"+this.options.titleheight+"px; }";else if(this.options.headerpos=="top")styleCss+="top:0px; height:auto; }";else styleCss+="bottom:0px; height:auto; }";styleCss+=" .html5gallery-timer-"+this.id+" {display:block; position:absolute; top:"+String(this.options.elemTop+this.options.height-2)+"px; left:0px; width:0px; height:2px; background-color:#ccc; filter:alpha(opacity=60); opacity:0.6; }";styleCss+=" .html5gallery-elem-"+this.id+" {display:block; overflow:hidden; position:absolute; top:"+ this.options.elemTop+"px; left:0px; width:"+this.options.width+"px; height:"+this.options.height+"px;}";if(this.options.isIE7||this.options.isIE6){styleCss+=" .html5gallery-loading-"+this.id+" {display:none; }";styleCss+=" .html5gallery-loading-center-"+this.id+" {display:none; }"}else{styleCss+=" .html5gallery-loading-"+this.id+" {display:block; position:absolute; top:4px; right:4px; width:100%; height:100%; background:url('"+this.options.skinfolder+"loading.gif') no-repeat top right;}";styleCss+= " .html5gallery-loading-center-"+this.id+" {display:block; position:absolute; top:0px; left:0px; width:100%; height:100%; background:url('"+this.options.skinfolder+"loading_center.gif') no-repeat center center;}"}if(this.options.borderradius>0)styleCss+=" .html5gallery-elem-"+this.id+" {overflow:hidden; border-radius:"+this.options.borderradius+"px; -moz-border-radius:"+this.options.borderradius+"px; -webkit-border-radius:"+this.options.borderradius+"px;}";if(this.options.slideshadow){styleCss+=" .html5gallery-title-"+ this.id+" { padding:4px;}";styleCss+=" .html5gallery-timer-"+this.id+" { margin:4px;}";styleCss+=" .html5gallery-elem-"+this.id+" { overflow:hidden; padding:4px; -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}"}if(this.options.showcarousel&&this.options.carouselmultirows){styleCss+=" .html5gallery-car-"+this.id+" { position:absolute; display:block; overflow:hidden; left:"+this.options.carouselLeft+"px; top:"+this.options.carouselTop+"px; width:"+ this.options.width+"px;";if(this.options.carouselbgtransparent)styleCss+="background-color:transparent;";else styleCss+="border-top:1px solid "+this.options.carouseltopborder+";"+"border-bottom:1px solid "+this.options.carouselbottomborder+";"+"background-color: "+this.options.carouselbgcolorend+"; "+"background: "+this.options.carouselbgcolorend+" -webkit-gradient(linear, left top, left bottom, from("+this.options.carouselbgcolorstart+"), to("+this.options.carouselbgcolorend+")) no-repeat; "+"background: "+ this.options.carouselbgcolorend+" -moz-linear-gradient(top, "+this.options.carouselbgcolorstart+", "+this.options.carouselbgcolorend+") no-repeat; "+"filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+") no-repeat; "+"-ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+")' no-repeat;";if(this.options.carouselbgimage)styleCss+= "background:url('"+this.options.skinfolder+this.options.carouselbgimage+"') center top;";styleCss+="}";var column=Math.floor(this.options.width/(this.options.thumbwidth+this.options.thumbgap));if(column<1)column=1;var marginL=(this.options.width-column*this.options.thumbwidth-(column-1)*this.options.thumbgap)/2;styleCss+=".html5gallery-thumbs-"+this.id+" { position:relative; display:block; margin-left:"+marginL+"px; width:"+this.options.width+"px; top:0px; }";styleCss+=" .html5gallery-tn-"+this.id+ " { display:block; float:left; margin-left:0px; margin-right:"+this.options.thumbgap+"px; margin-bottom:"+this.options.thumbrowgap+"px; text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+this.options.thumbheight+"px;overflow:hidden;}";if(this.options.thumbshadow)styleCss+=" .html5gallery-tn-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";styleCss+=" .html5gallery-tn-selected-"+this.id+" { display:block; float:left; margin-left:0px; margin-right:"+ this.options.thumbgap+"px; margin-bottom:"+this.options.thumbrowgap+"px; text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+this.options.thumbheight+"px;overflow:hidden;}";if(this.options.thumbshadow)styleCss+=" .html5gallery-tn-selected-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";styleCss+=" .html5gallery-tn-"+this.id+" {background-color:"+this.options.thumbimagebordercolor+";}"+" .html5gallery-tn-"+ this.id+" { filter:alpha(opacity="+Math.round(this.options.thumbopacity*100)+"); opacity:"+this.options.thumbopacity+"; } "+" .html5gallery-tn-selected-"+this.id+" { filter:alpha(opacity=100); opacity:1; } ";styleCss+=" .html5gallery-tn-img-"+this.id+" {display:block; overflow:hidden; width:"+String(this.options.thumbimagewidth+2*this.options.thumbimageborder)+"px;height:"+String(this.options.thumbimageheight+2*this.options.thumbimageborder)+"px;}";if(this.options.thumbunselectedimagebordercolor)styleCss+= " .html5gallery-tn-selected-"+this.id+" {background-color:"+this.options.thumbunselectedimagebordercolor+";}";if(this.options.thumbshowtitle){styleCss+=" .html5gallery-tn-title-"+this.id+" {display:block; overflow:hidden; float:top; height:"+this.options.thumbtitleheight+"px;width:"+String(this.options.thumbwidth-2)+"px;line-height:"+this.options.thumbtitleheight+"px;}";styleCss+=" .html5gallery-tn-title-"+this.id+this.options.thumbtitlecss}else styleCss+=" .html5gallery-tn-title-"+this.id+" {display:none;}"; this.carouselHighlight=function(index,nonanimation){}}else if(this.options.showcarousel){styleCss+=" .html5gallery-car-"+this.id+" { position:absolute; display:block; overflow:hidden; left:"+this.options.carouselLeft+"px; top:"+this.options.carouselTop+"px; width:"+this.options.width+"px; height:"+this.options.carouselHeight+"px;";if(this.options.carouselbgtransparent)styleCss+="background-color:transparent;";else styleCss+="border-top:1px solid "+this.options.carouseltopborder+";"+"border-bottom:1px solid "+ this.options.carouselbottomborder+";"+"background-color: "+this.options.carouselbgcolorend+"; "+"background: "+this.options.carouselbgcolorend+" -webkit-gradient(linear, left top, left bottom, from("+this.options.carouselbgcolorstart+"), to("+this.options.carouselbgcolorend+")) no-repeat; "+"background: "+this.options.carouselbgcolorend+" -moz-linear-gradient(top, "+this.options.carouselbgcolorstart+", "+this.options.carouselbgcolorend+") no-repeat; "+"filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+ this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+") no-repeat; "+"-ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+")' no-repeat;";if(this.options.carouselbgimage)styleCss+="background:url('"+this.options.skinfolder+this.options.carouselbgimage+"') center top;";styleCss+="}";var carLeft=4;var carRight=4;if(this.options.slideshadow)carLeft+=12;styleCss+=" .html5gallery-car-list-"+ this.id+" { position:absolute; display:block; overflow:hidden; left:"+carLeft+"px; width:"+String(this.options.width-carLeft-carRight)+"px; top:0px; height:"+this.options.carouselHeight+"px; "+"}";this.options.carouselNavButton=false;if(Math.floor((this.options.width-carLeft-carRight)/(this.options.thumbwidth+this.options.thumbgap))this.options.thumbTotalWidth)marginL=this.options.thumbMaskWidth/2-this.options.thumbTotalWidth/2-this.options.thumbgap/2;styleCss+=".html5gallery-thumbs-"+this.id+" { position:relative; display:block; margin-left:"+marginL+"px; width:"+ String(this.elemArray.length*(this.options.thumbwidth+this.options.thumbgap))+"px; top:"+Math.round(this.options.carouselHeight/2-this.options.thumbheight/2)+"px; }";var maskLeft=Math.round((this.options.width-carLeft-carRight)/2-this.options.thumbMaskWidth/2);styleCss+=" .html5gallery-car-mask-"+this.id+" { position:absolute; display:block; text-align:left; overflow:hidden; left:"+maskLeft+"px; width:"+this.options.thumbMaskWidth+"px; top:0px; height:"+this.options.carouselHeight+"px;} ";styleCss+= " .html5gallery-tn-"+this.id+" { display:block; float:left; margin-left:"+Math.floor(this.options.thumbgap/2)+"px; margin-right:"+Math.floor(this.options.thumbgap/2)+"px; text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+this.options.thumbheight+"px;overflow:hidden;}";if(this.options.thumbshadow)styleCss+=" .html5gallery-tn-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";styleCss+=" .html5gallery-tn-selected-"+ this.id+" { display:block; float:left; margin-left:"+Math.floor(this.options.thumbgap/2)+"px; margin-right:"+Math.floor(this.options.thumbgap/2)+"px;text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+this.options.thumbheight+"px;overflow:hidden;}";if(this.options.thumbshadow)styleCss+=" .html5gallery-tn-selected-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";styleCss+=" .html5gallery-tn-"+this.id+ " {background-color:"+this.options.thumbimagebordercolor+";}"+" .html5gallery-tn-"+this.id+" { filter:alpha(opacity="+Math.round(this.options.thumbopacity*100)+"); opacity:"+this.options.thumbopacity+"; } "+" .html5gallery-tn-selected-"+this.id+" { filter:alpha(opacity=100); opacity:1; } ";styleCss+=" .html5gallery-tn-img-"+this.id+" {display:block; overflow:hidden; width:"+String(this.options.thumbimagewidth+2*this.options.thumbimageborder)+"px;height:"+String(this.options.thumbimageheight+2*this.options.thumbimageborder)+ "px;}";if(this.options.thumbunselectedimagebordercolor)styleCss+=" .html5gallery-tn-selected-"+this.id+" {background-color:"+this.options.thumbunselectedimagebordercolor+";}";if(this.options.thumbshowtitle){styleCss+=" .html5gallery-tn-title-"+this.id+" {display:block; overflow:hidden; float:top; height:"+this.options.thumbtitleheight+"px;width:"+String(this.options.thumbwidth-2)+"px;line-height:"+this.options.thumbtitleheight+"px;}";styleCss+=" .html5gallery-tn-title-"+this.id+this.options.thumbtitlecss}else styleCss+= " .html5gallery-tn-title-"+this.id+" {display:none;}";this.carouselHighlight=function(index,nonanimation){$("#html5gallery-tn-"+this.id+"-"+index,this.$gallery).removeClass("html5gallery-tn-"+this.id).addClass("html5gallery-tn-selected-"+this.id);if(this.options.thumbShowNum>=this.elemArray.length){$(".html5gallery-car-left-"+this.id,this.$gallery).css({"background-position":"-"+String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$(".html5gallery-car-left-"+this.id,this.$gallery).data("disabled", true);$(".html5gallery-car-right-"+this.id,this.$gallery).css({"background-position":"-"+String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$(".html5gallery-car-right-"+this.id,this.$gallery).data("disabled",true);return}var pos=Math.floor(index/this.options.thumbShowNum)*this.options.thumbShowNum*(this.options.thumbwidth+this.options.thumbgap);if(pos>=this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap)pos=this.options.thumbTotalWidth-this.options.thumbMaskWidth+ this.options.thumbgap;pos=-pos;if(nonanimation)$(".html5gallery-thumbs-"+this.id,this.$gallery).css({marginLeft:pos});else $(".html5gallery-thumbs-"+this.id,this.$gallery).animate({marginLeft:pos},500);this.updateCarouseButtons(pos)};this.carouselPrev=function(){var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);if(parseInt($thumbContainer.css("margin-left"))==0)return;else{var pos=-1*parseInt($thumbContainer.css("margin-left"))-this.options.thumbShowNum*(this.options.thumbwidth+ this.options.thumbgap);if(pos<0)pos=0;$thumbContainer.animate({marginLeft:-pos},500,this.options.carouseleasing);this.updateCarouseButtons(-pos)}};this.carouselNext=function(){var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);if(parseInt($thumbContainer.css("margin-left"))==-(this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap))return;else{var pos=-1*parseInt($thumbContainer.css("margin-left"))+this.options.thumbShowNum*(this.options.thumbwidth+this.options.thumbgap); if(pos>=this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap)pos=this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap;$thumbContainer.animate({marginLeft:-pos},500,this.options.carouseleasing);this.updateCarouseButtons(-pos)}};this.updateCarouseButtons=function(pos){var $leftButton=$(".html5gallery-car-left-"+this.id,this.$gallery);var $rightButton=$(".html5gallery-car-right-"+this.id,this.$gallery);var rightMost=-1*(this.options.thumbTotalWidth- this.options.thumbMaskWidth+this.options.thumbgap);if(pos==0){$leftButton.css({"background-position":"-"+String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$leftButton.data("disabled",true)}else if($leftButton.data("disabled")){$leftButton.css({"background-position":"0px 0px",cursor:"pointer"});$leftButton.data("disabled",false)}if(pos==rightMost){$rightButton.css({"background-position":"-"+String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$rightButton.data("disabled",true)}else if($rightButton.data("disabled")){$rightButton.css({"background-position":"0px 0px", cursor:"pointer"});$rightButton.data("disabled",false)}}}else styleCss+=" .html5gallery-car-"+this.id+" { display:none; }";styleCss+=".html5gallery-container-"+this.id+" div {box-sizing:content-box;}";$("head").append("")},loadCarousel:function(){var instance=this;var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);$thumbContainer.empty();for(var i=0;i");$thumb.appendTo($thumbContainer);if(!this.options.thumblinkintitle)$thumb.unbind("click").click(function(event){instance.onThumbClick($(this).data("index"));instance.slideRun($(this).data("index"),true,true)});$thumb.hover(function(){instance.onThumbOver();$(this).removeClass("html5gallery-tn-"+instance.id).addClass("html5gallery-tn-selected-"+instance.id)},function(){if($(this).data("index")!==instance.curElem)$(this).removeClass("html5gallery-tn-selected-"+ instance.id).addClass("html5gallery-tn-"+instance.id)});var imgLoader=new Image;imgLoader.data=i;$(imgLoader).load(function(){var scale=Math.max(instance.options.thumbimagewidth/this.width,instance.options.thumbimageheight/this.height);var w=Math.round(scale*this.width);var h=Math.round(scale*this.height);var videoPlay=instance.options.thumbshowplayonvideo&&instance.elemArray[this.data][ELEM_TYPE]!=1?"
":"";$("#html5gallery-tn-"+instance.id+"-"+this.data,$thumbContainer).append("
"+videoPlay+"
"+instance.elemArray[this.data][ELEM_TITLE]+(instance.options.thumbshowdescription? "
"+instance.elemArray[this.data][ELEM_INFORMATION]+"":"")+"
");if(instance.options.thumblinkintitle){var $thumbImage=$(".html5gallery-tn-img-"+instance.id,$thumbContainer);$thumbImage.unbind("click").click(function(event){instance.onThumbClick($(this).parent().data("index"));instance.slideRun($(this).parent().data("index"),true,true)})}});imgLoader.src=this.elemArray[i][ELEM_THUMBNAIL]}if(this.options.carouselmultirows)$thumbContainer.append("
")}, goNormal:function(){clearTimeout(this.slideshowTimeout);$(document).unbind("keyup.html5gallery");$(".html5gallery-timer-"+this.id,this.$gallery).css({width:0});clearInterval(this.slideTimer);this.slideTimerCount=0;this.isFullscreen=false;var $elem=$(".html5gallery-elem-"+this.id,this.$fullscreen).empty().css({top:this.options.elemTop});$(".html5gallery-box-"+this.id,this.$gallery).prepend($elem);this.slideRun(this.curElem);this.$fullscreen.remove();if(this.options.imagetoolboxmode=="show")this.showimagetoolbox(this.elemArray[this.curElem][ELEM_TYPE]); else this.hideimagetoolbox()},goFullscreen:function(){this.hideimagetoolbox();clearTimeout(this.slideshowTimeout);$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).css({width:0});clearInterval(this.slideTimer);this.slideTimerCount=0;this.isFullscreen=true;this.fullscreenInitial=20;this.fullscreenMargin=this.options.lightboxborder;this.fullscreenBarH=this.options.lightboxtextheight;this.fullscreenOutsideMargin=this.options.lightboxmargin;var fullW=this.options.isMobile?Math.max($(window).width(), $(document).width()):$(window).width();var w=this.elemArray[this.curElem][ELEM_WIDTH],h=this.elemArray[this.curElem][ELEM_HEIGHT];this.fullscreenWidth=fullW-2*this.fullscreenMargin-2*this.fullscreenOutsideMargin;var winH=window.innerHeight?window.innerHeight:$(window).height();this.fullscreenHeight=winH-2*this.fullscreenMargin-this.fullscreenBarH-2*this.fullscreenOutsideMargin;var fullH=Math.max(winH,$(document).height());var fW=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH], this.fullscreenWidth):this.fullscreenWidth;var fH=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):this.fullscreenHeight;var scale=Math.min(fW/w,fH/h);if(scale<1)w*=scale,h*=scale;var marginT=$(window).scrollTop()+Math.round((winH-(h+2*this.fullscreenMargin+this.fullscreenBarH))/2);this.$fullscreen=$("
"+"
"+"
"+"
"+"
"+"
"+ "
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+""+""+"
"+ "
");this.$fullscreen.appendTo("body");var instance=this;$(window).scroll(function(){var $box=$(".html5gallery-fullscreen-box-"+instance.id,instance.$fullscreen);var winH=window.innerHeight?window.innerHeight:$(window).height();var marginT=$(window).scrollTop()+Math.round((winH-$box.height())/2);$box.css({"top":marginT})});var $elem=$(".html5gallery-elem-"+this.id,this.$gallery).empty().css({top:0,position:"relative"});$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).animate({height:h+ 2*this.fullscreenMargin},"slow",function(){$(this).animate({width:w+2*instance.fullscreenMargin},"slow",function(){$(this).animate({height:"+="+instance.fullscreenBarH},"slow",function(){$(".html5gallery-fullscreen-elem-wrapper-"+instance.id,instance.$fullscreen).prepend($elem);instance.slideRun(instance.curElem)})})});$(".html5gallery-fullscreen-overlay-"+this.id,this.$fullscreen).click(function(){instance.goNormal()});$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).hover(function(){if(instance.elemArray.length> 1){$(".html5gallery-fullscreen-next-"+instance.id,instance.$fullscreen).fadeIn();$(".html5gallery-fullscreen-prev-"+instance.id,instance.$fullscreen).fadeIn()}},function(){$(".html5gallery-fullscreen-next-"+instance.id,instance.$fullscreen).fadeOut();$(".html5gallery-fullscreen-prev-"+instance.id,instance.$fullscreen).fadeOut()});$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).touchSwipe({preventWebBrowser:true,swipeLeft:function(){if(!instance.disableTouchSwipe)instance.slideRun(-1)}, swipeRight:function(){if(!instance.disableTouchSwipe)instance.slideRun(-2)}});$(".html5gallery-fullscreen-close-"+this.id,this.$fullscreen).click(function(){instance.goNormal()});$(".html5gallery-fullscreen-next-"+this.id,this.$fullscreen).click(function(){instance.slideRun(-1)});$(".html5gallery-fullscreen-prev-"+this.id,this.$fullscreen).click(function(){instance.slideRun(-2)});$(".html5gallery-fullscreen-play-"+this.id,this.$fullscreen).click(function(){$(".html5gallery-fullscreen-play-"+instance.id, instance.$fullscreen).hide();$(".html5gallery-fullscreen-pause-"+instance.id,instance.$fullscreen).show();instance.isPaused=false;var slideshowinterval=instance.elemArray[instance.curElem][ELEM_DURATION]?instance.elemArray[instance.curElem][ELEM_DURATION]:instance.options.slideshowinterval;instance.slideshowTimeout=setTimeout(function(){instance.slideRun(-1)},slideshowinterval);$(".html5gallery-fullscreen-timer-"+instance.id,instance.$fullscreen).css({width:0});instance.slideTimerCount=0;if(instance.options.showtimer)instance.slideTimer= setInterval(function(){instance.showSlideTimer()},50)});$(".html5gallery-fullscreen-pause-"+this.id,this.$fullscreen).click(function(){$(".html5gallery-fullscreen-play-"+instance.id,instance.$fullscreen).show();$(".html5gallery-fullscreen-pause-"+instance.id,instance.$fullscreen).hide();instance.isPaused=true;clearTimeout(instance.slideshowTimeout);$(".html5gallery-fullscreen-timer-"+instance.id,instance.$fullscreen).css({width:0});clearInterval(instance.slideTimer);instance.slideTimerCount=0});$(document).bind("keyup.html5gallery", function(e){if(e.keyCode==27)instance.goNormal();else if(e.keyCode==39)instance.slideRun(-1);else if(e.keyCode==37)instance.slideRun(-2)})},calcIndex:function(index){this.savedElem=this.curElem;if(index==-2){this.nextElem=this.curElem;this.curElem=this.prevElem;this.prevElem=this.curElem-1<0?this.elemArray.length-1:this.curElem-1}else if(index==-1){this.prevElem=this.curElem;this.curElem=this.nextElem;this.nextElem=this.curElem+1>=this.elemArray.length?0:this.curElem+1}else if(index>=0){this.curElem= index;this.prevElem=this.curElem-1<0?this.elemArray.length-1:this.curElem-1;this.nextElem=this.curElem+1>=this.elemArray.length?0:this.curElem+1}},showSlideTimer:function(){var slideshowinterval=this.elemArray[this.curElem][ELEM_DURATION]?this.elemArray[this.curElem][ELEM_DURATION]:this.options.slideshowinterval;this.slideTimerCount++;if(this.isFullscreen)$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).width(Math.round($(".html5gallery-fullscreen-elem-wrapper-"+this.id,this.$fullscreen).width()* 50*(this.slideTimerCount+1)/slideshowinterval));else $(".html5gallery-timer-"+this.id,this.$gallery).width(Math.round(this.options.boxWidth*50*(this.slideTimerCount+1)/slideshowinterval))},setHd:function(isHd,switching){var type=this.elemArray[this.curElem][ELEM_TYPE];var toSwitch=this.isHd!=isHd&&switching&&(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM);this.isHd=isHd;if(toSwitch)this.slideRun(this.curElem,false,false,true)},enableUpdateCarousel:function(){this.disableupdatecarousel= false},slideRun:function(index,navClicked,thumbClicked,videoSwitching){clearTimeout(this.slideshowTimeout);if(this.isFullscreen)$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).css({width:0});else $(".html5gallery-timer-"+this.id,this.$gallery).css({width:0});clearInterval(this.slideTimer);this.slideTimerCount=0;if(this.options.showcarousel&&this.curElem>=0)$("#html5gallery-tn-"+this.id+"-"+this.curElem,this.$gallery).removeClass("html5gallery-tn-selected-"+this.id).addClass("html5gallery-tn-"+ this.id);this.calcIndex(index);if(this.options.socialurlforeach)this.createSocialMedia();if(!this.isFullscreen&&this.options.showcarousel){$("#html5gallery-tn-"+this.id+"-"+this.curElem,this.$gallery).removeClass("html5gallery-tn-"+this.id).addClass("html5gallery-tn-selected-"+this.id);if(!this.options.notupdatecarousel&&!this.disableupdatecarousel)this.carouselHighlight(this.curElem)}if(this.options.showtitle||this.options.lightboxshowtitle||this.options.lightboxshowdescription){var title=this.elemArray[this.curElem][ELEM_TITLE]; var description=this.elemArray[this.curElem][ELEM_INFORMATION];if(this.options.shownumbering)title=this.options.numberingformat.replace("%NUM",this.curElem+1).replace("%TOTAL",this.elemArray.length)+" "+title;if(this.isFullscreen){var fullscreentitle="";if(this.options.lightboxshowtitle&&title)fullscreentitle+=title;if(this.options.lightboxshowdescription&&description)fullscreentitle+="
"+description+"
";$(".html5gallery-fullscreen-title-"+ this.id,this.$fullscreen).html(fullscreentitle)}else if(this.options.showtitle){var titleHtml="";if(title)titleHtml+="
"+title+"
";if(this.options.showdescription&&description)titleHtml+="
"+description+"
";$(".html5gallery-title-"+this.id,this.$gallery).html(titleHtml)}}var type=this.elemArray[this.curElem][ELEM_TYPE];if(type<0)return;if(!this.isFullscreen&&navClicked)if(this.options.showimagetoolbox== "always"){if(this.options.imagetoolboxmode=="mouseover"||this.options.imagetoolboxmode=="show")this.showimagetoolbox(type)}else{if(this.options.showimagetoolbox=="image"&&type!=TYPE_IMAGE)this.hideimagetoolbox()}else if(this.options.imagetoolboxmode=="show")this.showimagetoolbox(type);else this.hideimagetoolbox();this.onChange();var $elem=$(".html5gallery-elem-"+this.id,parent);$elem.find("iframe").each(function(){$(this).attr("src","")});$elem.find("video").each(function(){$(this).attr("src","")}); this.disableTouchSwipe=false;var playVideo=this.options.autoplayvideo||this.options.playvideoonclick&&thumbClicked||videoSwitching;var parent=this.isFullscreen?this.$fullscreen:this.$gallery;this.showingPoster=false;if((type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM||type==TYPE_VIDEO_YOUTUBE||type==TYPE_VIDEO_VIMEO||type==TYPE_EMBED_VIDEO)&&!playVideo&&this.elemArray[this.curElem][ELEM_POSTER]){this.showingPoster=true;this.showPoster()}else{if($(".html5gallery-video-play-"+ this.id,parent).length)$(".html5gallery-video-play-"+this.id,parent).remove();if(type==TYPE_IMAGE)this.showImage();else if(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM)this.showVideo(playVideo,videoSwitching);else if(type==TYPE_VIDEO_YOUTUBE)this.showYoutube(playVideo);else if(type==TYPE_VIDEO_VIMEO)this.showVimeo(playVideo);else if(type==TYPE_EMBED_VIDEO)this.showEmbedVideo(playVideo);else if(type==TYPE_SWF)this.showSWF();else if(type==TYPE_IFRAME)this.showIframe()}if(this.prevElem in this.elemArray&&this.elemArray[this.prevElem][ELEM_TYPE]==1)(new Image).src=this.elemArray[this.prevElem][ELEM_SRC];if(this.nextElem in this.elemArray&&this.elemArray[this.nextElem][ELEM_TYPE]==1)(new Image).src=this.elemArray[this.nextElem][ELEM_SRC];if(this.prevElem in this.elemArray&&!this.options.autoplayvideo&&this.elemArray[this.prevElem][ELEM_POSTER])(new Image).src=this.elemArray[this.prevElem][ELEM_POSTER];if(this.nextElem in this.elemArray&&!this.options.autoplayvideo&&this.elemArray[this.nextElem][ELEM_POSTER])(new Image).src= this.elemArray[this.nextElem][ELEM_POSTER];if(this.curElem==this.elemArray.length-1)this.looptimes++;var instance=this;if((type==TYPE_IMAGE||this.showingPoster)&&!this.isPaused&&this.elemArray.length>1&&(!this.options.loop||this.looptimes=this.options.loop){this.looptimes=0;this.pauseGallery()}if(this.elemArray[this.curElem][ELEM_LINK]){$elem.css({cursor:"pointer"});$elem.unbind("click").bind("click",function(){if(instance.elemArray[instance.curElem][ELEM_LINKTARGET])window.open(instance.elemArray[instance.curElem][ELEM_LINK], instance.elemArray[instance.curElem][ELEM_LINKTARGET]);else window.open(instance.elemArray[instance.curElem][ELEM_LINK])})}else{$elem.css({cursor:""});$elem.unbind("click")}},showImage:function(){var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var $elem=$(".html5gallery-elem-"+this.id,parent);if($elem.html()==="")$preloading=$("
").appendTo($elem);else $preloading=$("
").appendTo($elem); var instance=this;var imgLoader=new Image;$(imgLoader).load(function(){$preloading.remove();instance.elemArray[instance.curElem][ELEM_WIDTH]=this.width;instance.elemArray[instance.curElem][ELEM_HEIGHT]=this.height;var scale;if(instance.isFullscreen){var fullW=instance.elemArray[instance.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(instance.elemArray[instance.curElem][ELEM_LIGHTBOXWIDTH],instance.fullscreenWidth):instance.fullscreenWidth;var fullH=instance.elemArray[instance.curElem][ELEM_LIGHTBOXHEIGHT]? Math.min(instance.elemArray[instance.curElem][ELEM_LIGHTBOXHEIGHT],instance.fullscreenHeight):instance.fullscreenHeight;scale=Math.min(fullW/this.width,fullH/this.height);scale=scale>1?1:scale}else if(instance.options.resizemode=="fill")scale=Math.max(instance.options.width/this.width,instance.options.height/this.height);else scale=Math.min(instance.options.width/this.width,instance.options.height/this.height);var w=Math.round(scale*this.width);var h=Math.round(scale*this.height);var w1=instance.isFullscreen? w:instance.options.width;var h1=instance.isFullscreen?h:instance.options.height;var l=Math.round(w1/2-w/2);var t=Math.round(h1/2-h/2);if(instance.isFullscreen)instance.adjustFullscreen(w1,h1);$elem.css({"width":w1,"height":h1});var $imgCur=$("
"+instance.options.watermarkcode+"
");var $imgPrev=$(".html5gallery-elem-img-"+instance.id,$elem);if($imgPrev.length){$elem.prepend($imgCur);$elem.html5boxTransition(instance.id, $imgPrev,$imgCur,{effect:instance.options.effect,easing:instance.options.easing,duration:instance.options.duration,direction:instance.curElem>=instance.savedElem,slide:instance.options.slide},function(){})}else $elem.html($imgCur);if(instance.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Image","Play",instance.elemArray[instance.curElem][ELEM_SRC]])});$(imgLoader).error(function(){$preloading.remove();if(instance.isFullscreen)instance.adjustFullscreen(instance.options.width, instance.options.height);$elem.html("
The requested content cannot be found
");if(instance.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Image","Error",instance.elemArray[instance.curElem][ELEM_SRC]])}); imgLoader.src=this.elemArray[this.curElem][ELEM_SRC]},adjustFullscreen:function(w1,h1,noanimation){var fullW=this.options.isMobile?Math.max($(window).width(),$(document).width()):$(window).width();this.fullscreenWidth=fullW-2*this.fullscreenMargin-2*this.fullscreenOutsideMargin;var winH=window.innerHeight?window.innerHeight:$(window).height();this.fullscreenHeight=winH-2*this.fullscreenMargin-this.fullscreenBarH-2*this.fullscreenOutsideMargin;var fullH=Math.max(winH,$(document).height());var fW=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]? Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):this.fullscreenWidth;var fH=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):this.fullscreenHeight;var scale=Math.min(fW/w1,fH/h1);if(scale<1)w1*=scale,h1*=scale;var marginT=$(window).scrollTop()+Math.round((winH-(h1+2*this.fullscreenMargin+this.fullscreenBarH))/2);$(".html5gallery-fullscreen-"+this.id).css({width:fullW+"px",height:fullH+ "px"});$(".html5gallery-fullscreen-title-"+this.id,this.$fullscreen).css({"width":w1-2*this.fullscreenMargin-72});if(noanimation){$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).css({"width":w1+2*this.fullscreenMargin,"height":h1+2*this.fullscreenMargin+this.fullscreenBarH,"top":marginT});$(".html5gallery-fullscreen-elem-"+this.id,this.$fullscreen).css({"width":w1+2*this.fullscreenMargin,"height":h1+2*this.fullscreenMargin});$(".html5gallery-fullscreen-elem-wrapper-"+this.id,this.$fullscreen).css({"width":w1, "height":h1});$(".html5gallery-fullscreen-bar-"+this.id,this.$fullscreen).css({"width":w1+2*this.fullscreenMargin})}else{$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).animate({"width":w1+2*this.fullscreenMargin,"height":h1+2*this.fullscreenMargin+this.fullscreenBarH,"top":marginT},"slow");$(".html5gallery-fullscreen-elem-"+this.id,this.$fullscreen).animate({"width":w1+2*this.fullscreenMargin,"height":h1+2*this.fullscreenMargin},"slow");$(".html5gallery-fullscreen-elem-wrapper-"+this.id, this.$fullscreen).animate({"width":w1,"height":h1},"slow");$(".html5gallery-fullscreen-bar-"+this.id,this.$fullscreen).animate({"width":w1+2*this.fullscreenMargin},"slow")}$(".html5gallery-fullscreen-next-"+this.id,this.$fullscreen).css({"top":Math.round(h1/2)});$(".html5gallery-fullscreen-prev-"+this.id,this.$fullscreen).css({"top":Math.round(h1/2)});$(".html5gallery-fullscreen-play-"+this.id,this.$fullscreen).css("display",this.isPaused&&this.elemArray.length>1&&this.elemArray[this.curElem][ELEM_TYPE]== 1?"block":"none");$(".html5gallery-fullscreen-pause-"+this.id,this.$fullscreen).css("display",this.isPaused||this.elemArray.length<=1||this.elemArray[this.curElem][ELEM_TYPE]!=1?"none":"block");$(".html5gallery-elem-"+this.id,this.$fullscreen).css({"width":w1,"height":h1});$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).css({top:String(h1-4)+"px"});$(".html5gallery-elem-video-"+this.id,this.$fullscreen).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-container-"+ this.id,this.$fullscreen).css({"width":w1+"px","height":h1+"px"});var h2=this.options.isIPhone?h1-48:h1;$(".html5gallery-elem-video-container-"+this.id,this.$fullscreen).find("video").css({"width":w1+"px","height":h2+"px"});$("#html5gallery-elem-video-"+this.id,this.$fullscreen).css({"width":w1+"px","height":h1+"px"});$("#html5gallery-elem-video-"+this.id,this.$fullscreen).attr("width",w1);$("#html5gallery-elem-video-"+this.id,this.$fullscreen).attr("height",h1);$(".html5gallery-elem-video-"+this.id, this.$fullscreen).find("iframe").attr("width",w1);$(".html5gallery-elem-video-"+this.id,this.$fullscreen).find("iframe").attr("height",h1);$("#html5gallery-elem-video-"+this.id,this.$fullscreen).find("iframe").attr("width",w1);$("#html5gallery-elem-video-"+this.id,this.$fullscreen).find("iframe").attr("height",h1)},showPoster:function(){var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var $elem=$(".html5gallery-elem-"+this.id,parent);if($elem.html()==="")$preloading=$("
").appendTo($elem);else $preloading=$("
").appendTo($elem);var instance=this;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var imgLoader=new Image;$(imgLoader).load(function(){$preloading.remove();var scale,w1,h1;if(instance.isFullscreen){var lw=instance.elemArray[instance.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(instance.elemArray[instance.curElem][ELEM_LIGHTBOXWIDTH],instance.fullscreenWidth): Math.min(dataW,instance.fullscreenWidth);var lh=instance.elemArray[instance.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(instance.elemArray[instance.curElem][ELEM_LIGHTBOXHEIGHT],instance.fullscreenHeight):Math.min(dataH,instance.fullscreenHeight);scale=Math.max(lw/this.width,lh/this.height);scale=scale>1?1:scale;w1=lw;h1=lh}else{if(instance.options.resizemode=="fill")scale=Math.max(instance.options.width/this.width,instance.options.height/this.height);else scale=Math.min(instance.options.width/this.width, instance.options.height/this.height);w1=instance.options.width;h1=instance.options.height}var w=Math.round(scale*this.width);var h=Math.round(scale*this.height);var l=Math.round(w1/2-w/2);var t=Math.round(h1/2-h/2);if(instance.isFullscreen)instance.adjustFullscreen(w1,h1);$elem.css({"width":w1,"height":h1});var $imgCur=$("
"+instance.options.watermarkcode+"
");var $imgPrev=$(".html5gallery-elem-img-"+ instance.id,$elem);if($imgPrev.length){$elem.prepend($imgCur);$elem.html5boxTransition(instance.id,$imgPrev,$imgCur,{effect:instance.options.effect,easing:instance.options.easing,duration:instance.options.duration,direction:instance.curElem>=instance.savedElem,slide:instance.options.slide},function(){})}else $elem.html($imgCur);if(!$(".html5gallery-video-play-"+instance.id,parent).length){var $play=$("
").appendTo($elem);$play.unbind(instance.eClick).bind(instance.eClick,function(){$(this).remove();clearTimeout(instance.slideshowTimeout);$(".html5gallery-timer-"+instance.id,instance.$gallery).css({width:0});clearInterval(instance.slideTimer);instance.slideTimerCount=0;instance.showingPoster=false;var type=instance.elemArray[instance.curElem][ELEM_TYPE];if(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG|| type==TYPE_VIDEO_WEBM)instance.showVideo(true);else if(type==TYPE_VIDEO_YOUTUBE)instance.showYoutube(true);else if(type==TYPE_VIDEO_VIMEO)instance.showVimeo(true);else if(type==TYPE_EMBED_VIDEO)instance.showEmbedVideo(true)})}});$(imgLoader).error(function(){$preloading.remove();if(instance.isFullscreen)instance.adjustFullscreen(instance.options.width,instance.options.height);$elem.html("
The requested content cannot be found
");if(instance.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Image","Error",instance.elemArray[instance.curElem][ELEM_POSTER]])});imgLoader.src=this.elemArray[this.curElem][ELEM_POSTER]},showVideo:function(autoPlay,videoSwitching){this.disableTouchSwipe=true;var parent=this.isFullscreen? this.$fullscreen:this.$gallery;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){var lw=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):Math.min(dataW,this.fullscreenWidth);var lh=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):Math.min(dataH,this.fullscreenHeight); this.adjustFullscreen(lw,lh);w1=lw;h1=lh}else{$(".html5gallery-elem-"+this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});w1=this.options.width;h1=this.options.height}var timeStamp=-1;if(videoSwitching&&$(".html5gallery-elem-"+this.id,parent).find("video").length)timeStamp=$(".html5gallery-elem-"+this.id,parent).find("video:first").get(0).currentTime;$(".html5gallery-elem-"+this.id,parent).html("
"+this.options.watermarkcode);this.isHTML5=false;if(this.options.isIE678||this.options.isIE9&&this.options.useflashonie9||this.options.isIE10&&this.options.useflashonie10||this.options.isIE11&&this.options.useflashonie11)this.isHTML5=false;else if(this.options.isMobile)this.isHTML5= true;else if((this.options.html5player||!this.options.flashInstalled)&&this.options.html5VideoSupported)if(!this.options.isFirefox&&!this.options.isOpera||(this.options.isFirefox||this.options.isOpera)&&(this.elemArray[this.curElem][ELEM_SRC_OGG]||this.elemArray[this.curElem][ELEM_SRC_WEBM]))this.isHTML5=true;if(this.isHTML5){var videoSrc=this.elemArray[this.curElem][ELEM_SRC];var videoHd=this.elemArray[this.curElem][ELEM_HD];if(this.options.isFirefox||this.options.isOpera||!videoSrc){videoSrc=this.elemArray[this.curElem][ELEM_SRC_WEBM]? this.elemArray[this.curElem][ELEM_SRC_WEBM]:this.elemArray[this.curElem][ELEM_SRC_OGG];videoHd=this.elemArray[this.curElem][ELEM_HD_WEBM]?this.elemArray[this.curElem][ELEM_HD_WEBM]:this.elemArray[this.curElem][ELEM_HD_OGG]}this.embedHTML5Video($(".html5gallery-elem-video-"+this.id,parent),w1,h1,videoSrc,videoHd,autoPlay,timeStamp,videoSwitching)}else{var videoFile=this.elemArray[this.curElem][ELEM_SRC];if(videoFile.charAt(0)!="/"&&videoFile.substring(0,5)!="http:"&&videoFile.substring(0,6)!="https:")videoFile= this.options.htmlfolder+videoFile;var hdFile="";if(this.elemArray[this.curElem][ELEM_HD]){hdFile=this.elemArray[this.curElem][ELEM_HD];if(hdFile.charAt(0)!="/"&&hdFile.substring(0,5)!="http:"&&hdFile.substring(0,6)!="https:")hdFile=this.options.htmlfolder+hdFile}this.embedFlash($(".html5gallery-elem-video-"+this.id,parent),"100%","100%",this.options.jsfolder+"html5boxplayer.swf","transparent",{width:w1,height:h1,hidecontrols:this.options.videohidecontrols?"1":"0",hideplaybutton:"0",videofile:videoFile, hdfile:hdFile,ishd:this.isHd?"1":"0",autoplay:autoPlay?"1":"0",errorcss:".html5box-error"+this.options.errorcss,id:this.id})}if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Video","Play",this.elemArray[this.curElem][ELEM_SRC]])},showSWF:function(){var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var w1=this.elemArray[this.curElem][ELEM_WIDTH];var h1=this.elemArray[this.curElem][ELEM_HEIGHT];if(this.isFullscreen)this.adjustFullscreen(w1,h1);else $(".html5gallery-elem-"+ this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});var t1=this.isFullscreen?0:Math.round((this.options.height-h1)/2)+(this.options.slideshadow?4:0);var l1=this.isFullscreen?0:Math.round((this.options.width-w1)/2)+(this.options.slideshadow?4:0);$(".html5gallery-elem-"+this.id,parent).html("
"+this.options.watermarkcode); this.embedFlash($(".html5gallery-elem-flash-"+this.id,parent),w1,h1,this.elemArray[this.curElem][ELEM_SRC],"window",{});if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Flash","Play",this.elemArray[this.curElem][ELEM_SRC]])},prepareYoutubeHref:function(href){var youtubeId=href.match(/(\?v=|\/\d\/|\/embed\/|\/v\/|\.be\/)([a-zA-Z0-9\-\_]+)/)[2];var result=("https:"==document.location.protocol?"https:":"http:")+"//www.youtube.com/embed/"+youtubeId;var params=this.getYoutubeParams(href); var first=true;for(var key in params){if(first){result+="?";first=false}else result+="&";result+=key+"="+params[key]}return result},getYoutubeParams:function(href){var result={};if(href.indexOf("?")<0)return result;var params=href.substring(href.indexOf("?")+1).split("&");for(var i=0;i
"+this.options.watermarkcode);if(src.match(/\:\/\/.*(dai\.ly)/i)){var id=src.match(/(dai\.ly\/)([a-zA-Z0-9\-\_]+)/)[2];src=(src.match(/https\:\/\//i)?"https": "http")+"://www.dailymotion.com/embed/video/"+id}if(autoPlay)if(src.indexOf("?")<0)src+="?autoplay=1";else src+="&autoplay=1";$("#html5gallery-elem-video-"+this.id,parent).html("");if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Video","Play",this.elemArray[this.curElem][ELEM_SRC]])},showYoutube:function(autoPlay){var parent=this.isFullscreen? this.$fullscreen:this.$gallery;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){var lw=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):Math.min(dataW,this.fullscreenWidth);var lh=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):Math.min(dataH,this.fullscreenHeight); this.adjustFullscreen(lw,lh);w1=lw;h1=lh}else{$(".html5gallery-elem-"+this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});w1=this.options.width;h1=this.options.height}var src=this.elemArray[this.curElem][ELEM_SRC];$(".html5gallery-elem-"+this.id,parent).html("
"+this.options.watermarkcode);var instance=this;if(!ASYouTubeIframeAPIReady){ASYouTubeTimeout+=100;if(ASYouTubeTimeout<3E3){setTimeout(function(){instance.showYoutube(autoPlay)},100);return}}if(ASYouTubeIframeAPIReady&&!this.options.isMobile&&!this.options.isIE6&&!this.options.isIE7){var id=this.elemArray[this.curElem][ELEM_SRC].match(/(\?v=|\/\d\/|\/embed\/|\/v\/|\.be\/)([a-zA-Z0-9\-\_]+)/)[2]; var onPlayReady=null;if(autoPlay)onPlayReady=function(event){event.target.playVideo()};var youtubeParams=this.getYoutubeParams(this.elemArray[this.curElem][ELEM_SRC]);youtubeParams=$.extend({"html5":1,"controls":instance.options.videohidecontrols?"0":"1","showinfo":instance.options.videohidecontrols?"0":"1","autoplay":autoPlay?1:0,"rel":0,"wmode":"transparent"},youtubeParams);new YT.Player("html5gallery-elem-video-"+this.id,{width:w1,height:h1,videoId:id,playerVars:youtubeParams,events:{"onReady":onPlayReady, "onStateChange":function(event){if(event.data==YT.PlayerState.ENDED){instance.onVideoEnd();if(!instance.isPaused)instance.slideRun(-1)}}}})}else{src=this.prepareYoutubeHref(src);if(autoPlay)if(src.indexOf("?")<0)src+="?autoplay=1";else src+="&autoplay=1";if(src.indexOf("?")<0)src+="?wmode=transparent&rel=0";else src+="&wmode=transparent&rel=0";if(instance.options.videohidecontrols)src+="&controls=0&showinfo=0";$("#html5gallery-elem-video-"+this.id,parent).html("")}if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Video","Play",this.elemArray[this.curElem][ELEM_SRC]])},showVimeo:function(autoPlay){var instance=this;if(typeof $f!=="function"){ASVimeoTimeout+=100;if(ASVimeoTimeout<3E3){setTimeout(function(){instance.showVimeo(autoPlay)},100);return}}var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var dataW=this.elemArray[this.curElem][ELEM_WIDTH]; var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){var lw=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):Math.min(dataW,this.fullscreenWidth);var lh=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):Math.min(dataH,this.fullscreenHeight);this.adjustFullscreen(lw,lh);w1=lw;h1=lh}else{$(".html5gallery-elem-"+ this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});w1=this.options.width;h1=this.options.height}var src=this.elemArray[this.curElem][ELEM_SRC];if(src.indexOf("?")<0)src+="?";else src+="&";if(autoPlay&&!this.options.isAndroid)src+="autoplay=1";else src+="autoplay=0";src+="&api=1&player_id=html5gallery_vimeo_"+this.id;$(".html5gallery-elem-"+this.id,parent).html("
"+this.options.watermarkcode);$(".html5gallery-elem-video-"+this.id,parent).html("");if(typeof $f==="function"&& autoPlay&&!this.options.isAndroid){var vimeoIframe=$("#html5gallery_vimeo_"+this.id)[0];var vimeoPlayer=$f(vimeoIframe);var instance=this;vimeoPlayer.addEvent("ready",function(){vimeoPlayer.addEvent("finish",function(id){instance.onVideoEnd();if(!instance.isPaused)instance.slideRun(-1)})})}if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Video","Play",this.elemArray[this.curElem][ELEM_SRC]])},showIframe:function(){var parent=this.isFullscreen?this.$fullscreen:this.$gallery; var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){var lw=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):Math.min(dataW,this.fullscreenWidth);var lh=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):Math.min(dataH,this.fullscreenHeight);this.adjustFullscreen(lw, lh);w1=lw;h1=lh}else{$(".html5gallery-elem-"+this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});w1=this.options.width;h1=this.options.height}var src=this.elemArray[this.curElem][ELEM_SRC];$(".html5gallery-elem-"+this.id,parent).html("
"+this.options.watermarkcode);$(".html5gallery-elem-iframe-"+this.id,parent).html("");if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Iframe","Play",this.elemArray[this.curElem][ELEM_SRC]])},checkType:function(href){if(!href)return-1; if(href.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i))return TYPE_IMAGE;if(href.match(/[^\.]\.(swf)\s*$/i))return TYPE_SWF;if(href.match(/[^\.]\.(mp3)\s*$/i))return TYPE_MP3;if(href.match(/[^\.]\.(pdf)\s*$/i))return TYPE_PDF;if(href.match(/\.(flv)(.*)?$/i))return TYPE_VIDEO_FLASH;if(href.match(/\.(mp4|m4v)(.*)?$/i))return TYPE_VIDEO_MP4;if(href.match(/\.(ogv|ogg)(.*)?$/i))return TYPE_VIDEO_OGG;if(href.match(/\.(webm)(.*)?$/i))return TYPE_VIDEO_WEBM;if(href.match(/\:\/\/.*(youtube\.com)/i)||href.match(/\:\/\/.*(youtu\.be)/i))return TYPE_VIDEO_YOUTUBE; if(href.match(/\:\/\/.*(vimeo\.com)/i))return TYPE_VIDEO_VIMEO;if(href.match(/\:\/\/.*(dailymotion\.com)/i)||href.match(/\:\/\/.*(dai\.ly)/i))return TYPE_EMBED_VIDEO;return 0},onChange:function(){if(this.options.onchange&&window[this.options.onchange]&&typeof window[this.options.onchange]=="function")window[this.options.onchange](this.elemArray[this.curElem].concat([this.id]))},onSlideshowOver:function(){if(this.options.onslideshowover&&window[this.options.onslideshowover]&&typeof window[this.options.onslideshowover]== "function")window[this.options.onslideshowover](this.elemArray[this.curElem])},onThumbOver:function(){if(this.options.onthumbover&&window[this.options.onthumbover]&&typeof window[this.options.onthumbover]=="function")window[this.options.onthumbover](this.elemArray[this.curElem])},onThumbClick:function(index){if(this.options.onthumbclick&&window[this.options.onthumbclick]&&typeof window[this.options.onthumbclick]=="function")window[this.options.onthumbclick](this.elemArray[index].concat([this.id])); if(this.options.thumbjumptotop)if(this.options.thumbjumpanchor&&this.options.thumbjumpanchor.length>0&&$("#"+this.options.thumbjumpanchor).length>0){var t0=$("#"+this.options.thumbjumpanchor).offset().top;$(window).scrollTop(t0)}else if(this.options.thumbjumpposition>=0)$(window).scrollTop(this.options.thumbjumpposition);else{var t=this.container.offset().top;if(t<$(window).scrollTop())$(window).scrollTop(t)}},onVideoEnd:function(){if(this.options.onvideoend&&window[this.options.onvideoend]&&typeof window[this.options.onvideoend]== "function")window[this.options.onvideoend](this.elemArray[this.curElem])},embedHTML5Video:function($container,w,h,src,hd,autoPlay,timeStamp,videoSwitching){$container.html("
");$("video",$container).get(0).setAttribute("src", (hd&&this.isHd?hd:src)+(timeStamp>0?"#t="+timeStamp:""));if(!this.options.nativehtml5controls&&!this.options.videohidecontrols){$("video",$container).data("src",src);$("video",$container).data("hd",hd);$("video",$container).data("ishd",this.isHd);$("video",$container).addHTML5VideoControls(this.options.skinfolder,this)}if(autoPlay||videoSwitching)$("video",$container).get(0).play();var instance=this;$("video",$container).unbind("ended").bind("ended",function(){instance.onVideoEnd();if(!instance.isPaused)instance.slideRun(-1)})}, embedFlash:function($container,w,h,src,wmode,flashVars){if(this.options.flashInstalled){var htmlOptions={pluginspage:"http://www.adobe.com/go/getflashplayer",quality:"high",allowFullScreen:"true",allowScriptAccess:"always",type:"application/x-shockwave-flash"};htmlOptions.width=w;htmlOptions.height=h;htmlOptions.src=src;htmlOptions.wmode=wmode;htmlOptions.flashVars=$.param(flashVars);var htmlString="";for(var key in htmlOptions)htmlString+=key+"="+htmlOptions[key]+" ";$container.html("")}else $container.html("
The required Adobe Flash Player plugin is not installed
Get Adobe Flash player
")}}; this.each(function(){var $this=$(this);options=options||{};for(var key in options)if(key.toLowerCase()!==key){options[key.toLowerCase()]=options[key];delete options[key]}this.options=$.extend({},options);var instance=this;$.each($this.data(),function(key,value){instance.options[key.toLowerCase()]=value});if("skin"in this.options)this.options.skin=this.options.skin.toLowerCase();var commonOptions={freelink:"http://www.wonderplugin.com/wordpress-gallery/",watermark:"",watermarklink:"",skin:"horizontal", googlefonts:"",enabletouchswipe:true,enabletouchswipeonandroid:true,responsive:false,responsivefullscreen:false,screenquery:{},src:"",xml:"",xmlnocache:true,autoslide:false,slideshowinterval:6E3,random:false,borderradius:0,loop:0,notupdatecarousel:false,updatecarouselinterval:6E4,autoplayvideo:false,html5player:true,playvideoonclick:true,videohidecontrols:false,nativehtml5controls:false,hddefault:false,useflashonie9:true,useflashonie10:false,useflashonie11:false,lightboxborder:8,lightboxtextheight:72, lightboxmargin:12,lightboxbgcolor:"#fff",lightboxshowtitle:true,lightboxtitlecss:" {color:#333333; font:bold 12px Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; line-height:18px;}",lightboxtitlelinkcss:" a {color:#333333;}",lightboxshowdescription:true,lightboxdescriptioncss:" {color:#333333; font:normal 12px Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; line-height:14px;}",lightboxdescriptionlinkcss:" a {color:#333333;}",effect:"fade",easing:"easeOutCubic",duration:1500, slide:{duration:1E3,easing:"easeOutExpo"},width:480,height:270,showtimer:true,resizemode:"fit",showtitle:true,titleheight:45,errorcss:" {text-align:center; color:#ff0000; font-size:14px; font-family:Arial, sans-serif;}",shownumbering:false,numberingformat:"%NUM / %TOTAL",googleanalyticsaccount:"",showsocialmedia:false,socialheight:30,socialurlforeach:false,showfacebooklike:true,facebooklikeurl:"",showtwitter:true,twitterurl:"",twitterusername:"",twittervia:"html5box",showgoogleplus:true,googleplusurl:"", showimagetoolbox:"always",imagetoolboxstyle:"side",imagetoolboxmode:"mouseover",showplaybutton:true,showprevbutton:true,shownextbutton:true,showfullscreenbutton:true,carouselbgtransparent:true,carouselbgcolorstart:"#ffffff",carouselbgcolorend:"#ffffff",carouseltopborder:"#ffffff",carouselbottomborder:"#ffffff",carouselbgimage:"",carouseleasing:"easeOutCirc",carouselarrowwidth:32,carouselarrowheight:32,carouselmultirows:false,thumbrowgap:16,thumblinkintitle:false,thumbjumptotop:false,thumbjumpposition:-1, thumbjumpanchor:"",youtubeapikey:"",youtubeplaylistid:"",youtubeplaylistmaxresults:"",version:"3.6",fv:true,fm:"87,111,114,100,80,114,101,115,115,32,71,97,108,108,101,114,121,32,70,114,101,101,32,86,101,114,115,105,111,110"};var horizontalSkinOptions={skinfolder:"skins/horizontal/",padding:6,bgcolor:"#ffffff",bgimage:"",galleryshadow:true,slideshadow:false,showsocialmedia:false,headerpos:"top",showdescription:true,titleoverlay:true,titleautohide:true,titlecss:" {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }", titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:13px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",descriptioncsslink:" a {color:#ffffff;}", showcarousel:true,carouselmargin:0,carouselbgtransparent:false,carouselbgcolorstart:"#494f54",carouselbgcolorend:"#292c31",carouseltopborder:"#666666",carouselbottomborder:"#111111",thumbwidth:64,thumbheight:48,thumbgap:4,thumbmargin:6,thumbunselectedimagebordercolor:"#ffffff",thumbimageborder:1,thumbimagebordercolor:"",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8};var lightSkinOptions={padding:12,skinfolder:"skins/light/",bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:true, showsocialmedia:false,headerpos:"top",showdescription:true,titleoverlay:true,titleautohide:true,titlecss:" {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }", titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",descriptioncsslink:" a {color:#ffffff;}", showcarousel:true,carouselmargin:10,carouselbgtransparent:true,thumbwidth:48,thumbheight:48,thumbgap:8,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:2,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:true,thumbopacity:0.8};var mediapageSkinOptions={padding:0,skinfolder:"skins/mediapage/",bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:false,showsocialmedia:false,headerpos:"top",showdescription:true,titleoverlay:true,titleautohide:true,titlecss:" {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }", titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",descriptioncsslink:" a {color:#ffffff;}", showcarousel:true,carouselmargin:24,carouselmultirows:true,thumbrowgap:16,carouselbgtransparent:true,thumbwidth:120,thumbheight:60,thumbgap:10,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:0,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8,thumbjumptotop:true,thumbshowtitle:true,thumbtitlecss:"{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden;}",thumbtitleheight:24};var gallerySkinOptions= {padding:12,skinfolder:"skins/gallery/",bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:true,showsocialmedia:false,headerpos:"top",showdescription:true,titleoverlay:true,titleautohide:true,titlecss:" {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }", titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",descriptioncsslink:" a {color:#ffffff;}", showcarousel:true,carouselmargin:10,carouselbgtransparent:true,thumbwidth:120,thumbheight:60,thumbgap:8,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:2,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:true,thumbopacity:0.8,thumbshowtitle:true,thumbtitlecss:"{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:nowrap;}",thumbtitleheight:18};var galleryWithTextSkinOptions={padding:12,skinfolder:"skins/gallery/", bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:true,showsocialmedia:false,headerpos:"bottom",showdescription:true,titleoverlay:false,titleheight:72,titleautohide:true,titlecss:"{color:#333;font-size:14px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:16px 8px 4px 8px;}",titlecsslink:"a{color:#333;}",descriptioncss:"{color:#333;font-size:12px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:4px 8px; }",descriptioncsslink:"a{color:#333;}", showcarousel:true,carouselmargin:10,carouselbgtransparent:true,thumbwidth:120,thumbheight:60,thumbgap:8,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:2,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:true,thumbopacity:0.8,thumbshowtitle:false,thumbtitlecss:"{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:nowrap;}",thumbtitleheight:18};var darknessSkinOptions={skinfolder:"skins/darkness/", padding:12,bgcolor:"#444444",bgimage:"background.jpg",galleryshadow:false,slideshadow:false,headerpos:"bottom",showdescription:false,titleoverlay:false,titleautohide:false,titlecss:" {color:#ffffff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}", descriptioncsslink:" a {color:#ffffff;}",showcarousel:true,carouselmargin:8,carouselbgtransparent:false,carouselbgcolorstart:"#494f54",carouselbgcolorend:"#292c31",carouseltopborder:"#666666",carouselbottomborder:"#111111",thumbwidth:64,thumbheight:48,thumbgap:4,thumbmargin:6,thumbunselectedimagebordercolor:"#ffffff",thumbimageborder:1,thumbimagebordercolor:"",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8};var verticalSkinOptions={skinfolder:"skins/vertical/",padding:12,bgcolor:"#444444", bgimage:"background.jpg",galleryshadow:false,slideshadow:false,headerpos:"bottom",showdescription:false,titleoverlay:false,titleautohide:false,titlecss:" {color:#ffffff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}", descriptioncsslink:" a {color:#ffffff;}",showcarousel:true,carouselmargin:8,carouselposition:"right",carouselbgtransparent:false,carouselbgcolorstart:"#494f54",carouselbgcolorend:"#292c31",carouseltopborder:"#666666",carouselbottomborder:"#111111",carouselhighlightbgcolorstart:"#999999",carouselhighlightbgcolorend:"#666666",carouselhighlighttopborder:"#cccccc",carouselhighlightbottomborder:"#444444",carouselhighlightbgimage:"",thumbwidth:148,thumbheight:48,thumbgap:2,thumbmargin:6,thumbunselectedimagebordercolor:"", thumbimageborder:1,thumbimagebordercolor:"#cccccc",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8,thumbshowimage:true,thumbshowtitle:true,thumbtitlecss:"{text-align:center; color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:nowrap;}"};var showcaseSkinOptions={skinfolder:"skins/showcase/",padding:12,bgcolor:"#444444",bgimage:"background.jpg",galleryshadow:false,slideshadow:false,showsocialmedia:false,headerpos:"bottom",showdescription:false, titleoverlay:false,titleautohide:false,titlecss:" {color:#ffffff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}",descriptioncsslink:" a {color:#ffffff;}",showcarousel:true,carouselmargin:8,carouselposition:"bottom", carouselheight:210,carouselbgtransparent:false,carouselbgcolorstart:"#494f54",carouselbgcolorend:"#292c31",carouseltopborder:"#666666",carouselbottomborder:"#111111",carouselhighlightbgcolorstart:"#999999",carouselhighlightbgcolorend:"#666666",carouselhighlighttopborder:"#cccccc",carouselhighlightbottomborder:"#444444",carouselhighlightbgimage:"",thumbwidth:148,thumbheight:60,thumbgap:2,thumbmargin:6,thumbunselectedimagebordercolor:"",thumbimageborder:1,thumbimagebordercolor:"#cccccc",thumbshowplayonvideo:true, thumbshadow:false,thumbopacity:0.8,thumbshowimage:true,thumbshowtitle:true,thumbtitlecss:"{text-align:left; color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; padding: 6px 0;}",thumbshowdescription:true,thumbdescriptioncss:"{font-size:10px;}"};var sysOptions=commonOptions;if(this.options.skin=="vertical")sysOptions=$.extend(sysOptions,verticalSkinOptions);else if(this.options.skin=="showcase")sysOptions=$.extend(sysOptions,showcaseSkinOptions);else if(this.options.skin== "light")sysOptions=$.extend(sysOptions,lightSkinOptions);else if(this.options.skin=="gallery")sysOptions=$.extend(sysOptions,gallerySkinOptions);else if(this.options.skin=="gallerywithtext")sysOptions=$.extend(sysOptions,galleryWithTextSkinOptions);else if(this.options.skin=="horizontal")sysOptions=$.extend(sysOptions,horizontalSkinOptions);else if(this.options.skin=="darkness")sysOptions=$.extend(sysOptions,darknessSkinOptions);else if(this.options.skin=="mediapage")sysOptions=$.extend(sysOptions, mediapageSkinOptions);else sysOptions=$.extend(sysOptions,horizontalSkinOptions);this.options=$.extend(sysOptions,this.options);if("slideduration"in this.options)this.options.slide.duration=this.options.slideduration;this.options.htmlfolder=window.location.href.substr(0,window.location.href.lastIndexOf("/")+1);if(!this.options.jsfolder||!this.options.jsfolder.length)this.options.jsfolder=jsFolder;if(this.options.skinfolder.charAt(0)!="/"&&this.options.skinfolder.substring(0,5)!="http:"&&this.options.skinfolder.substring(0, 6)!="https:")this.options.skinfolder=this.options.jsfolder+this.options.skinfolder;var i;var l;var mark="";var bytes=this.options.fm.split(",");for(i=0;i